nano

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

commit f02e2d3b6efc402bd70a87dff3cb1df66e3aa5b0
parent 252f14796ed04385f4f4bf29505dd5bbfe4f3110
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Mon, 22 Oct 2018 14:09:18 -0500

input: properly recognize Alt+Delete when using -K/--rebindkeypad

This works for xterm, rxvt, Eterm, Konsole, and xfce4-terminal, which
generate "Esc [ 3 ; 3 ~", but not for urxvt, which generates one of
its double-escape sequences, "Esc Esc [ 3 ~".

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

diff --git a/src/winio.c b/src/winio.c @@ -1112,6 +1112,9 @@ int convert_sequence(const int *seq, size_t length, int *consumed) #ifndef NANO_TINY if (length > 4 && seq[2] == ';' && seq[4] == '~') { *consumed = 5; + if (seq[3] == '3') + /* Esc [ 3 ; 3 ~ == Alt-Delete on xterm/rxvt/Eterm/Terminal. */ + return ALT_DELETE; if (seq[3] == '5') /* Esc [ 3 ; 5 ~ == Ctrl-Delete on xterm. */ return CONTROL_DELETE;