Commit 033376ae authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

input: consider only O, o and [ as starters of multi-character sequences

This prevents many keycode sequences from being misconstrued when a
command key plus other keystrokes accumulate in the input buffer.

This fixes https://savannah.gnu.org/bugs/?48395.
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -373,7 +373,8 @@ int parse_kbinput(WINDOW *win)
case 1:
/* Reset the escape counter. */
escapes = 0;
if (get_key_buffer_len() == 0 || key_buffer[0] == 0x1b) {
if ((*kbinput != 'O' && *kbinput != 'o' && *kbinput != '[') ||
get_key_buffer_len() == 0 || *key_buffer == 0x1B) {
/* One escape followed by a single non-escape:
* meta key sequence mode. */
meta_key = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment