commit 2fef7f647d2b544eb97059eb4a1f56a5e2bb95b3
parent 6d3b16b761f428a72afd82d6c8a7d306eb4661cf
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 15 Jul 2018 09:18:39 +0200
input: stop a modified Delete key from entering stuff into the buffer
When using option -K on an xterm-like terminal, pressing <Shift+Del>,
<Alt+Del>, or <Ctrl+Del> would enter "2~", "3~", or "5~", respectively,
into the buffer. Now it will just report an "Unknown sequence".
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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. */