nano

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

commit e471e2d462554a63eecb211c94bc884973f088f2
parent fe38b78486bd2c8fa2087e5e06ee2d55343227de
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun, 31 Jul 2016 18:29:57 +0200

tweaks: move the modified editing keys again

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

diff --git a/src/winio.c b/src/winio.c @@ -320,17 +320,6 @@ int get_kbinput(WINDOW *win) kbinput, meta_key ? "TRUE" : "FALSE"); #endif -#ifndef NANO_TINY - if (kbinput == controlleft) - kbinput = sc_seq_or(do_prev_word_void, 0); - else if (kbinput == controlright) - kbinput = sc_seq_or(do_next_word_void, 0); - else if (kbinput == controlup) - kbinput = sc_seq_or(do_prev_block, 0); - else if (kbinput == controldown) - kbinput = sc_seq_or(do_next_block, 0); -#endif - /* If we read from the edit window, blank the statusbar if needed. */ if (win == edit) check_statusblank(); @@ -515,6 +504,17 @@ int parse_kbinput(WINDOW *win) if (retval == ERR) return ERR; +#ifndef NANO_TINY + if (retval == controlleft) + return sc_seq_or(do_prev_word_void, 0); + else if (retval == controlright) + return sc_seq_or(do_next_word_void, 0); + else if (retval == controlup) + return sc_seq_or(do_prev_block, 0); + else if (retval == controldown) + return sc_seq_or(do_next_block, 0); +#endif + switch (retval) { #ifdef KEY_SLEFT /* Slang doesn't support KEY_SLEFT. */