input: properly handle <Escape>s followed by a shifted Meta+letter

After a series of escapes, also <Shift+Meta+letter> should be recognized
as a command keystroke, not just <Meta+letter>.

This fixes https://savannah.gnu.org/bugs/?55442.

Bug existed since the ignoring of <Escape>s before a valid command
keystroke was introduced in version 3.0, commit ecc9211a.
master
David Lawrence Ramsey 2019-01-10 12:18:51 -06:00 committed by Benno Schulenberg
parent e1a6f58da6
commit 194d18586c
1 changed files with 4 additions and 2 deletions

View File

@ -475,7 +475,7 @@ int parse_kbinput(WINDOW *win)
* or control character sequence mode. */ * or control character sequence mode. */
if (!solitary) { if (!solitary) {
meta_key = TRUE; meta_key = TRUE;
retval = keycode; retval = tolower(keycode);
} else } else
retval = get_control_kbinput(keycode); retval = get_control_kbinput(keycode);
else { else {
@ -502,8 +502,10 @@ int parse_kbinput(WINDOW *win)
break; break;
case 3: case 3:
if (key_buffer_len == 0) { if (key_buffer_len == 0) {
if (!solitary) if (!solitary) {
meta_key = TRUE; meta_key = TRUE;
retval = tolower(keycode);
} else
/* Three escapes followed by a non-escape, and no /* Three escapes followed by a non-escape, and no
* other codes are waiting: normal input mode. */ * other codes are waiting: normal input mode. */
retval = keycode; retval = keycode;