input: after an Esc, don't discard starter byte of a multibyte sequence

This fixes https://savannah.gnu.org/bugs/?48711.
master
Benno Schulenberg 2016-08-06 19:51:52 +02:00
parent 0a387d9d08
commit 8edb096821
1 changed files with 3 additions and 1 deletions

View File

@ -369,7 +369,9 @@ int parse_kbinput(WINDOW *win)
retval = keycode;
break;
case 1:
if ((keycode != 'O' && keycode != 'o' && keycode != '[') ||
if (keycode >= 0x80)
retval = keycode;
else if ((keycode != 'O' && keycode != 'o' && keycode != '[') ||
key_buffer_len == 0 || *key_buffer == ESC_CODE) {
/* One escape followed by a single non-escape:
* meta key sequence mode. */