^A/#repeat vs extended commands

Fix '#repeat' for tty; both it and ^A can repeat an extended command.

Fix both for curses; they can repeat an extended command instead of
just repeating the initial '#' to start getting an extended command.

X11 (tested), Qt (tested), and probably Windows GUI (not tested)
behave the same as before:  ^A (or #repeat) after an extended command
just repeats the # to run the dialog to get an extended command.

I hope this introduces fewer bugs than it fixes but I don't think I'd
bet on that....
This commit is contained in:
PatR
2022-04-16 01:52:12 -07:00
parent 4485515872
commit 31affa0722
8 changed files with 116 additions and 30 deletions
+6 -1
View File
@@ -1556,8 +1556,13 @@ X11_get_ext_cmd(void)
/* The callbacks will enable the event loop exit. */
(void) x_event(EXIT_ON_EXIT);
if (extended_cmd_selected < 0)
if (extended_cmd_selected < 0) {
if (!g.in_doagain)
savech(0);
return -1;
}
if (!g.in_doagain)
savech_extcmd(command_list[extended_cmd_selected], TRUE);
return command_indx[extended_cmd_selected];
}