nano

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

commit 194d18586c41b4c4d5cb9fbf03a10d4a7945a55e
parent e1a6f58da6c9b14132f2a92a6e60f67e11474c83
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Thu, 10 Jan 2019 12:18:51 -0600

input: properly handle <Escape>s followed by a shifted Meta+letter

After a series of escapes, also <Shift+Meta+letter> should be recognized
as a command keystroke, not just <Meta+letter>.

This fixes https://savannah.gnu.org/bugs/?55442.

Bug existed since the ignoring of <Escape>s before a valid command
keystroke was introduced in version 3.0, commit ecc9211a.

Diffstat:
Msrc/winio.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -475,7 +475,7 @@ int parse_kbinput(WINDOW *win) * or control character sequence mode. */ if (!solitary) { meta_key = TRUE; - retval = keycode; + retval = tolower(keycode); } else retval = get_control_kbinput(keycode); else { @@ -502,8 +502,10 @@ int parse_kbinput(WINDOW *win) break; case 3: if (key_buffer_len == 0) { - if (!solitary) + if (!solitary) { meta_key = TRUE; + retval = tolower(keycode); + } else /* Three escapes followed by a non-escape, and no * other codes are waiting: normal input mode. */ retval = keycode;