Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Up-arrow when both "traverse history" and "auto-repeat previous" are on

Up-arrow when both "traverse history" and "auto-repeat previous" are on

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Johnjohn   (4 posts)  Bio
Date Fri 02 Feb 2024 11:27 AM (UTC)
Message
Perhaps there is some option I'm missing, but it doesn't seem like it.
When both "arrow keys traverse history" and "auto-repeat previous command" are on, tapping the up arrow once first shows the previous command. This is redundant because the previous command is already in the input window when "auto-repeat" is on. To get to the first new command you have to tap the up-arrow twice which is a bit annoying.
Thanks! LMK if I'm missing something.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 03 Feb 2024 05:39 AM (UTC)
Message
I thought I had allowed for that:

https://github.com/nickgammon/mushclient/blob/b65b1b47c5766bbccf3fc8ae41ab35bbead97d36/sendvw.cpp#L512

However that test doesn't seem to be working. Maybe Fiendish can see the problem. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Johnjohn   (4 posts)  Bio
Date Reply #2 on Sat 03 Feb 2024 01:44 PM (UTC)
Message
Thanks for the reply on this!
This is a wild speculation, but might it have something to do with "auto repeat" not quite retaining the prior command but actually repeating it, so that checking the history position or get previous may not do what you expect?
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 03 Feb 2024 09:50 PM (UTC)
Message
If you look at command history (Ctrl+H) you will see that the repeated commands are not in fact added to the command stack.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #4 on Sat 03 Feb 2024 10:31 PM (UTC)
Message
A bit of experimenting indicates that the code in question is actually working. When testing under Windows XP (yes, I know) the up-arrow correctly goes to the previous entry (not the auto-filled one).

However testing under Wine, it does not. So, what operating system are you using?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 03 Feb 2024 10:33 PM (UTC)
Message
I tested using the latest pre-release version here:

https://github.com/nickgammon/mushclient/releases/download/latest_commit/MUSHclient.exe

See this post for more details about downloading that:


http://www.gammon.com.au/forum/?id=13903

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Johnjohn   (4 posts)  Bio
Date Reply #6 on Sat 03 Feb 2024 10:43 PM (UTC)
Message
Ah OK, I am running through Whisky (which I believe is Wine underneath) on a Mac. Should have mentioned that. I had indeed noticed some other things are tricky through wine (like ctrl+left / ctrl+right doesn't move by 1 word at a time in the command window).
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #7 on Sun 04 Feb 2024 03:18 AM (UTC)
Message
I've noticed another subtlety.

Under Wine, the auto-repeat replaces the last command you typed *and* selects it.

Then when you press up-arrow the first thing it does is deselect that command (it's like the keystroke is intercepted by the edit window). After the command is deselected, then pressing up-arrow goes back to the second-last command.

However pressing Alt+up-arrow immediately goes to the previous command, so you could try that as a work-around.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Johnjohn   (4 posts)  Bio
Date Reply #8 on Sun 04 Feb 2024 04:06 AM (UTC)
Message
Thanks, that workaround isn't too bad :)
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


5,160 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.