rcfile: allow to rebind the Cancel function in the yesno menu
This fixes the first part of https://savannah.gnu.org/bugs/?54447.
Этот коммит содержится в:
родитель
4170454837
Коммит
418bd3be34
@ -1441,6 +1441,9 @@ The 'search to replace' menu.
|
||||
@item replacewith
|
||||
The 'replace with' menu, which comes up after 'search to replace'.
|
||||
|
||||
@item yesno
|
||||
The 'yesno' menu, where the Yes/No/All/Cancel question is asked.
|
||||
|
||||
@item gotoline
|
||||
The 'goto line (and column)' menu.
|
||||
|
||||
|
@ -792,6 +792,9 @@ The 'search to replace' menu.
|
||||
.B replacewith
|
||||
The 'replace with' menu, which comes up after 'search to replace'.
|
||||
.TP
|
||||
.B yesno
|
||||
The 'yesno' menu, where the Yes/No/All/Cancel question is asked.
|
||||
.TP
|
||||
.B gotoline
|
||||
The 'goto line (and column)' menu.
|
||||
.TP
|
||||
|
@ -1713,6 +1713,8 @@ int strtomenu(const char *input)
|
||||
return MREPLACE;
|
||||
else if (!strcasecmp(input, "replacewith"))
|
||||
return MREPLACEWITH;
|
||||
else if (!strcasecmp(input, "yesno"))
|
||||
return MYESNO;
|
||||
else if (!strcasecmp(input, "gotoline"))
|
||||
return MGOTOLINE;
|
||||
else if (!strcasecmp(input, "writeout"))
|
||||
|
@ -678,6 +678,8 @@ int do_yesno_prompt(bool all, const char *msg)
|
||||
if (!ISSET(NO_HELP)) {
|
||||
char shortstr[MAXCHARLEN + 2];
|
||||
/* Temporary string for (translated) " Y", " N" and " A". */
|
||||
const sc *cancelshortcut = first_sc_for(MYESNO, do_cancel);
|
||||
/* The keystroke that is bound to the Cancel function. */
|
||||
|
||||
if (COLS < 32)
|
||||
width = COLS / 2;
|
||||
@ -701,7 +703,7 @@ int do_yesno_prompt(bool all, const char *msg)
|
||||
}
|
||||
|
||||
wmove(bottomwin, 2, width);
|
||||
post_one_key("^C", _("Cancel"), width);
|
||||
post_one_key(cancelshortcut->keystr, _("Cancel"), width);
|
||||
}
|
||||
|
||||
/* Color the statusbar over its full width and display the question. */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user