nano

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

commit b4babc2036ae2db48ac2a0c079c036d270472f57
parent f2150d3f98d95f485b01cb69475c98c6f6797467
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Mon, 11 Jul 2016 16:38:36 +0200

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

This fixes https://savannah.gnu.org/bugs/?48455.

Diffstat:
Msrc/winio.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

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