Brief summary of issue / Description of requested feature:
New function selectCmdLine to select all current text in command line
Steps to reproduce the issue / Reasons for adding feature:
- When you type text in command line and send to the game, the text in command line stays selected
- At this time, you can either modify the text, or delete it, or press enter to send again, or start typing to overwrite
- However, if you put text to command line via printCmdLine() the text is not selected and none of 2. possible
Error output / Expected result of feature
Actions from point 2. should become possible as well with this new function
Extra information, such as Mudlet version, operating system and ideas for how to solve / implement:
Requested by Brewer@MG
You can test this easily by typing the following in command line:
lua tempTimer(1, function() printCmdLine("test") end)
Then after sending the line, immediately delete (the still selected) text from command line.
After 1s, the "test" text will be added to command line, and indeed not be selected at all.
However, if you were to test with only lua printCmdLine("test") instead then the result may be confusing.
Because the command line will not show this previously sent lua command anymore but "test" alright, but this is now still selected for some reason.
Could be argued it should drop the selected status if the contents got modified by script, but who am I to say.
Brief summary of issue / Description of requested feature:
New function
selectCmdLineto select all current text in command lineSteps to reproduce the issue / Reasons for adding feature:
Error output / Expected result of feature
Actions from point 2. should become possible as well with this new function
Extra information, such as Mudlet version, operating system and ideas for how to solve / implement:
Requested by Brewer@MG
You can test this easily by typing the following in command line:
lua tempTimer(1, function() printCmdLine("test") end)Then after sending the line, immediately delete (the still selected) text from command line.
After 1s, the "test" text will be added to command line, and indeed not be selected at all.
However, if you were to test with only
lua printCmdLine("test")instead then the result may be confusing.Because the command line will not show this previously sent lua command anymore but "test" alright, but this is now still selected for some reason.
Could be argued it should drop the selected status if the contents got modified by script, but who am I to say.