bindings: at a Yes-No-All prompt, accept also ^A for "All"

This can be useful when replacing text in a Japanese locale,
avoiding the need to guide the input method to produce "A".

Inspired-by: Takeshi Hamasaki <hmatrjp@users.sourceforge.jp>
This commit is contained in:
Benno Schulenberg 2024-07-26 11:14:17 +02:00
parent 572247dbd8
commit af2f218192

View File

@ -761,9 +761,11 @@ int ask_user(bool withall, const char *question)
else if (kbinput == '\x0E' || (kbinput == '\x11' && !ISSET(MODERN_BINDINGS)) ||
(kbinput == '\x18' && ISSET(MODERN_BINDINGS)))
choice = NO;
/* And interpret ^Y as "Yes". */
/* Also, interpret ^Y as "Yes, and ^A as "All". */
else if (kbinput == '\x19')
choice = YES;
else if (kbinput == '\x01' && withall)
choice = ALL;
#ifdef ENABLE_MOUSE
else if (kbinput == KEY_MOUSE) {
int mouse_x, mouse_y;