input: accept only the four iTerm sequences that actually get handled

This fixes https://savannah.gnu.org/bugs/?48455.
master
Benno Schulenberg 2016-07-11 16:38:36 +02:00
parent f2150d3f98
commit b4babc2036
1 changed files with 2 additions and 4 deletions

View File

@ -406,9 +406,6 @@ int parse_kbinput(WINDOW *win)
retval = controlleft;
break;
#endif
default:
retval = ERR;
break;
}
double_esc = FALSE;
escapes = 0;
@ -472,7 +469,8 @@ int parse_kbinput(WINDOW *win)
retval = *kbinput;
}
}
} else if (*kbinput=='[') {
} else if (*kbinput == '[' && key_buffer_len > 0 &&
'A' <= *key_buffer && *key_buffer <= 'D') {
/* This is an iTerm2 sequence: ^[ ^[ [ X. */
double_esc = TRUE;
} else {