^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:
@@ -437,7 +437,7 @@ curses_ext_cmd(void)
|
||||
|
||||
curs_set(1);
|
||||
wrefresh(extwin);
|
||||
letter = getch();
|
||||
letter = pgetchar(); /* pgetchar(cmd.c) implements do-again */
|
||||
curs_set(0);
|
||||
prompt_width = (int) strlen(cur_choice);
|
||||
matches = 0;
|
||||
@@ -494,8 +494,23 @@ curses_ext_cmd(void)
|
||||
curses_destroy_win(extwin);
|
||||
if (extwin2)
|
||||
curses_destroy_win(extwin2);
|
||||
if (ret == -1 && *cur_choice)
|
||||
pline("%s: unknown extended command.", cur_choice);
|
||||
|
||||
if (ret != -1) {
|
||||
if (!g.in_doagain)
|
||||
savech_extcmd(cur_choice, TRUE);
|
||||
} else {
|
||||
char extcmd_char = extcmd_initiator();
|
||||
|
||||
if (*cur_choice)
|
||||
pline("%s%s: unknown extended command.",
|
||||
visctrl(extcmd_char), cur_choice);
|
||||
|
||||
if (!g.in_doagain) {
|
||||
savech(0); /* reset do-again buffer */
|
||||
if (letter != '\033')
|
||||
savech(extcmd_char);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user