input: don't take multiple keystrokes to be a single sequence

For some reason the keyboard code seems to assume that all integers
waiting in the keybuffer form a single sequence.  But this isn't the
case: when there is an escape (0x1b) among them, then that is where
a new sequence starts.  So, prevent the input code from considering
an escape after a non-escape as part of the current sequence.

This fixes https://savannah.gnu.org/bugs/?47839.
master
Benno Schulenberg 2016-05-04 08:48:03 +02:00
parent 937c47898a
commit 7b3649abc9
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ int parse_kbinput(WINDOW *win)
case 1:
/* Reset the escape counter. */
escapes = 0;
if (get_key_buffer_len() == 0) {
if (get_key_buffer_len() == 0 || key_buffer[0] == 0x1b) {
/* One escape followed by a non-escape, and
* there aren't any other keystrokes waiting:
* meta key sequence mode. Set meta_key to