nano

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

commit d2270e514bd9560db989bca0a2abb271b76c0e15
parent 031305c205dcf152313e3e5a1de48e5af196b488
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 16 Dec 2017 20:57:54 +0100

input: make <Ctrl+Shift+Arrow> work also when using --rebindkeypad

The function get_keycode() should never return zero -- it should
return either the code from ncurses or the given fallback code.

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

Diffstat:
Msrc/nano.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nano.c b/src/nano.c @@ -1532,7 +1532,7 @@ int get_keycode(const char *keyname, const int standard) #ifdef HAVE_KEY_DEFINED const char *keyvalue = tigetstr(keyname); - if (keyvalue != 0 && keyvalue != (char *)-1) + if (keyvalue != 0 && keyvalue != (char *)-1 && key_defined(keyvalue)) return key_defined(keyvalue); else #endif