Option to disable TabStop on (after) Send TextBox

Posted by Daniel P on Sun 18 Mar 2018 04:16 PM — 7 posts, 30,622 views.

USA #0
I saw this mentioned briefly in https://www.gammon.com.au/forum/?id=3506, but thought it would still be a useful and (possibly) easy to implement feature to option in.

Would it be difficult to add a checkbox to the Scripts configuration window or, more likely, a global configuration tab which would disable the UI TabStop after the Send TextBox, so that more reasonable indenting could be used while scripting via the in-client editor?

True, it's possible to edit in an external text editor or in a notepad, then copy it in, or set up an alias to reload a plugin, or whatever, but this seems like a very roundabout way of simply trapping the cursor in the inline editor...and takes about as much work, at least in my world, as typing all the spaces to keep code clean and readable (and in the case of Python, which I don't yet use, but would love to try, valid).

Thoughts? Yes? No?
Amended on Sun 18 Mar 2018 04:17 PM by Daniel P
Australia Forum Administrator #1
I've added this for multi-line editing windows so you would need to click the "Edit" button (sometimes labelled with "...") to enter the editor.

First, though, you need to get the latest version and enable the option.

Get latest version


See http://www.gammon.com.au/forum/?id=13903 for how to download the pre-release version of MUSHclient and install it.

Make the option available


Using the latest version, open MUSHclient, open Global Preferences (File -> Global Preferences) and then hit OK to save the preferences. This will add a new key to the preferences file on disk. Then close and re-open MUSHclient.

Install the option-changer plugin


See https://www.gammon.com.au/forum/?id=10603

Install the Global_Option_Updater plugin (File -> Plugins).

Type:


list_global_options


You should now see the option:


TabInsertsTabInMultiLineDialogs


... in the list of options.

Change the option


Type:


change_global_option TabInsertsTabInMultiLineDialogs 1


Save the global options


Close MUSHclient now to make sure it reads the options from disk next time.

Try out the new option


Go into a trigger or alias (or scripting Immediate window) and click on the edit button (...) to to edit the text. The tab key should now indent rather than move the focus to the next button.




Commit details: https://github.com/nickgammon/mushclient/commit/65a4ff8
Amended on Tue 27 Mar 2018 10:32 PM by Nick Gammon
USA #2
Very cool! I've only just gotten back to this, but thanks for the quick turnaround!

I'll take a glance when I get a chance soon and let you know how it works.

[EDIT] 2018-03-26: Just confirmed this works, though the option was not automatically added to the database on first execution of 5.06-pre (cd7bc71), and it doesn't look like the Global_Option_Updater plugin has an insert record command. Rather, I used the old method of opening it in DB Browser for SQLite and added the option to the prefs table manually. Then after that everything worked just fine, and the [...] dialog captures tabs perfectly. Anyway, thanks again!
Amended on Mon 26 Mar 2018 04:47 PM by Fiendish
Australia Forum Administrator #3
When I tested you had to follow my instructions exactly including opening the global options, hitting OK so it thought they might have changed, closing MUSHclient (to write out the options) and re-opening it.
USA #4
Ah, that would make sense. And yes, this does work as intended as well.
Australia Forum Administrator #5
Amended reply #1 to mention closing and re-opening the client to read back in the global preferences. It looks like I omitted that instruction the first time around.
Australia Forum Administrator #6

I have also amended the Global_Option_Updater plugin to be more useful in this situation. It has changed from only allowing existing options (in the database) to be changed, to allowing known options (in the client) to be changed.

This new plugin can be found here.