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; focusing = FALSE;
switch (flag) { switch (flag) {
case NO_HELP:
case ZERO: case ZERO:
window_init(); window_init();
draw_all_subwindows(); draw_all_subwindows();
if (flag == ZERO) return;
return; case NO_HELP:
window_init();
draw_all_subwindows();
break; break;
case CONSTANT_SHOW: case CONSTANT_SHOW:
if (ISSET(ZERO) || LINES == 1) { if (ISSET(ZERO) || LINES == 1) {
statusline(AHEM, _("Not possible in barless mode")); statusline(AHEM, _("Not possible"));
TOGGLE(flag); TOGGLE(flag);
} else if (!ISSET(MINIBAR)) } else if (!ISSET(MINIBAR))
wipe_statusbar(); wipe_statusbar();
return; return;
#ifdef ENABLE_MOUSE
case USE_MOUSE:
mouse_init();
break;
#endif
case SOFTWRAP: case SOFTWRAP:
if (!ISSET(SOFTWRAP)) if (!ISSET(SOFTWRAP))
openfile->firstcolumn = 0; openfile->firstcolumn = 0;
refresh_needed = TRUE; refresh_needed = TRUE;
break; break;
case TABS_TO_SPACES:
if (openfile->syntax && openfile->syntax->tab) {
statusline(AHEM, _("Current syntax determines Tab"));
TOGGLE(flag);
return;
}
break;
case WHITESPACE_DISPLAY: case WHITESPACE_DISPLAY:
titlebar(NULL); titlebar(NULL);
refresh_needed = TRUE; refresh_needed = TRUE;
@ -1113,6 +1102,18 @@ void toggle_this(int flag)
precalc_multicolorinfo(); precalc_multicolorinfo();
refresh_needed = TRUE; refresh_needed = TRUE;
break; 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 #endif
} }