nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 033376aec086a8931229f1999fdfb0c911be332a
parent e33a0b6dbec351c188cf51934dd63250aab654df
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Mon,  4 Jul 2016 13:17:45 +0200

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.

Diffstat:
Msrc/winio.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/winio.c b/src/winio.c @@ -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;