nano

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

commit b228c9fe6cc44855fe7670a0b2fa121d85346728
parent 8e7738e22e9a4085840c9dfa0e7d0f0aac3565a7
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 21 Nov 2021 17:00:41 +0100

tweaks: untangle two case items, and shorten a message

Also, sort the case items in the order they are listed in the help text.

Diffstat:
Msrc/nano.c | 33+++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1073,37 +1073,26 @@ void toggle_this(int flag) focusing = FALSE; switch (flag) { - case NO_HELP: case ZERO: window_init(); draw_all_subwindows(); - if (flag == ZERO) - return; + return; + case NO_HELP: + window_init(); + draw_all_subwindows(); break; case CONSTANT_SHOW: if (ISSET(ZERO) || LINES == 1) { - statusline(AHEM, _("Not possible in barless mode")); + statusline(AHEM, _("Not possible")); TOGGLE(flag); } else if (!ISSET(MINIBAR)) wipe_statusbar(); return; -#ifdef ENABLE_MOUSE - case USE_MOUSE: - mouse_init(); - break; -#endif case SOFTWRAP: if (!ISSET(SOFTWRAP)) openfile->firstcolumn = 0; refresh_needed = TRUE; break; - case TABS_TO_SPACES: - if (openfile->syntax && openfile->syntax->tab) { - statusline(AHEM, _("Current syntax determines Tab")); - TOGGLE(flag); - return; - } - break; case WHITESPACE_DISPLAY: titlebar(NULL); refresh_needed = TRUE; @@ -1114,6 +1103,18 @@ void toggle_this(int flag) refresh_needed = TRUE; break; #endif + case TABS_TO_SPACES: + if (openfile->syntax && openfile->syntax->tab) { + statusline(AHEM, _("Current syntax determines Tab")); + TOGGLE(flag); + return; + } + break; +#ifdef ENABLE_MOUSE + case USE_MOUSE: + mouse_init(); + break; +#endif } if (flag == AUTOINDENT || flag == BREAK_LONG_LINES || flag == SOFTWRAP) {