From 2fef7f647d2b544eb97059eb4a1f56a5e2bb95b3 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 15 Jul 2018 09:18:39 +0200 Subject: [PATCH] input: stop a modified Delete key from entering stuff into the buffer When using option -K on an xterm-like terminal, pressing , , or would enter "2~", "3~", or "5~", respectively, into the buffer. Now it will just report an "Unknown sequence". --- src/winio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/winio.c b/src/winio.c index d6d1df81..720f335c 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1085,6 +1085,8 @@ int convert_sequence(const int *seq, size_t length, int *consumed) * Linux console/xterm/Terminal. */ if (length > 2 && seq[2] == '~') return KEY_DC; + if (length > 4 && seq[4] == '~') + *consumed = 5; break; case '4': /* Esc [ 4 ~ == End on VT220/VT320/ * Linux console/xterm. */