nano

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

commit 2e539e2c97e7fa7fa47f94c8c259ce9396656e19
parent 38c286c019f0d12be42ccb972c767b3d116a43e2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 27 Dec 2019 11:35:10 +0100

tweaks: stop recognizing escape sequences for a key without meaning

Nano does not do anything for the keystroke anyway (KEY_B2, the center
key on the numeric keypad, gets translated to ERR later on), so there
is no point in recognizing some of its escape sequences -- let those
sequences result in "Unknown sequence" instead.

Diffstat:
Msrc/winio.c | 10----------
1 file changed, 0 insertions(+), 10 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -863,9 +863,6 @@ int convert_sequence(const int *seq, size_t length, int *consumed) case 'C': /* Esc O C == Right on VT100/VT320/xterm. */ case 'D': /* Esc O D == Left on VT100/VT320/xterm. */ return arrow_from_abcd(seq[1]); - case 'E': /* Esc O E == Center (5) on numeric keypad - * with NumLock off on xterm. */ - return KEY_B2; case 'F': /* Esc O F == End on xterm/Terminal. */ return KEY_END; case 'H': /* Esc O H == Home on xterm/Terminal. */ @@ -928,10 +925,6 @@ int convert_sequence(const int *seq, size_t length, int *consumed) return KEY_NPAGE; case 't': /* Esc O t == Left (4) on the same. */ return KEY_LEFT; - case 'u': /* Esc O u == Center (5) on numeric keypad - * with NumLock off on VT100/VT220/VT320/ - * rxvt/Eterm. */ - return KEY_B2; case 'v': /* Esc O v == Right (6) on numeric keypad * with NumLock off on VT100/VT220/VT320/ * rxvt/Eterm/Terminal. */ @@ -1203,9 +1196,6 @@ int convert_sequence(const int *seq, size_t length, int *consumed) case 'C': /* Esc [ C == Right on the same. */ case 'D': /* Esc [ D == Left on the same. */ return arrow_from_abcd(seq[1]); - case 'E': /* Esc [ E == Center (5) on numeric keypad with - * NumLock off on FreeBSD console/Terminal. */ - return KEY_B2; case 'F': /* Esc [ F == End on FreeBSD console/Eterm. */ return KEY_END; case 'G': /* Esc [ G == PageDown on FreeBSD console. */