nano

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

commit 58597b6d9bccf5f384552d0cfcd132e6fda2a6b4
parent 196e9136814e71f43d9ae17e4f16058d56dc1a35
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 22 Jan 2020 13:22:27 +0100

tweaks: judge from the key code itself whether it is a Meta keystroke

Diffstat:
Msrc/global.c | 3++-
Msrc/winio.c | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -419,7 +419,8 @@ int the_code_for(void (*func)(void), int defaultval) if (s == NULL) return defaultval; - meta_key = s->meta; + meta_key = (0x20 <= s->keycode && s->keycode <= 0x7E); + return s->keycode; } diff --git a/src/winio.c b/src/winio.c @@ -1689,7 +1689,7 @@ int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts) const keystruct *shortcut = first_sc_for(currmenu, f->func); put_back(shortcut->keycode); - if (shortcut->meta) + if (0x20 <= shortcut->keycode && shortcut->keycode <= 0x7E) put_back(ESC_CODE); break; }