nano

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

commit c7ad5c8d869d4d5e55439cc7c6c1d45f8e67b682
parent 0b1a766964113fe9d654c16d51f7fafeb26b3f06
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 13 Dec 2019 19:06:39 +0100

tweaks: reshuffle an item, to avoid a lone 'else'

Diffstat:
Msrc/rcfile.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -222,13 +222,12 @@ keystruct *strtosc(const char *input) s->toggle = 0; #endif + if (!strcmp(input, "cancel")) + s->func = do_cancel; #ifdef ENABLE_HELP - if (!strcmp(input, "help")) + else if (!strcmp(input, "help")) s->func = do_help_void; - else #endif - if (!strcmp(input, "cancel")) - s->func = do_cancel; else if (!strcmp(input, "exit")) s->func = do_exit; else if (!strcmp(input, "discardbuffer"))