tweaks: untangle two case items, and shorten a message

Also, sort the case items in the order they are listed in the help text.
master
Benno Schulenberg 2021-11-21 17:00:41 +01:00
parent 8e7738e22e
commit b228c9fe6c
1 changed files with 17 additions and 16 deletions

View File

@ -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;
@ -1113,6 +1102,18 @@ void toggle_this(int flag)
precalc_multicolorinfo();
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
}