From 5474a9f34b3146904bd7c526559d736295fb9d7e Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 7 Nov 2018 14:04:20 -0600 Subject: [PATCH] input: properly consume a modified Delete key also in the tiny version This fixes https://savannah.gnu.org/bugs/?54981. Bug existed since commit fb8d981b from a month ago. --- src/winio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/winio.c b/src/winio.c index 3708d1af..908225db 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1109,9 +1109,9 @@ int convert_sequence(const int *seq, size_t length, int *consumed) * Linux console/xterm/Terminal. */ if (length > 2 && seq[2] == '~') return KEY_DC; -#ifndef NANO_TINY if (length > 4 && seq[2] == ';' && seq[4] == '~') { *consumed = 5; +#ifndef NANO_TINY if (seq[3] == '2') /* Esc [ 3 ; 2 ~ == Shift-Delete on xterm/Terminal. */ return SHIFT_DELETE; @@ -1124,7 +1124,9 @@ int convert_sequence(const int *seq, size_t length, int *consumed) if (seq[3] == '6') /* Esc [ 3 ; 6 ~ == Ctrl-Shift-Delete on xterm. */ return controlshiftdelete; +#endif } +#ifndef NANO_TINY if (length > 2 && seq[2] == '$') /* Esc [ 3 $ == Shift-Delete on urxvt. */ return SHIFT_DELETE;