tweaks: replace a verbose condition with a simpler early return
parent
fc5d58ad97
commit
13edbedc79
13
src/nano.c
13
src/nano.c
|
@ -1084,19 +1084,20 @@ void do_toggle(int flag)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ISSET(MINIBAR) && ISSET(STATEFLAGS))
|
if (ISSET(STATEFLAGS) && (flag == AUTOINDENT ||
|
||||||
if (flag == AUTOINDENT || flag == BREAK_LONG_LINES || flag == SOFTWRAP)
|
flag == BREAK_LONG_LINES || flag == SOFTWRAP)) {
|
||||||
|
if (ISSET(MINIBAR))
|
||||||
|
return;
|
||||||
|
else
|
||||||
titlebar(NULL);
|
titlebar(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (ISSET(MINIBAR) && (flag == NO_HELP || flag == LINE_NUMBERS))
|
if (ISSET(MINIBAR) && (flag == NO_HELP || flag == LINE_NUMBERS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (flag == CONSTANT_SHOW)
|
if (flag == CONSTANT_SHOW)
|
||||||
wipe_statusbar();
|
wipe_statusbar();
|
||||||
else if (!ISSET(MINIBAR) || !ISSET(STATEFLAGS) || flag == SMART_HOME ||
|
else {
|
||||||
flag == NO_SYNTAX || flag == WHITESPACE_DISPLAY ||
|
|
||||||
flag == CUT_FROM_CURSOR || flag == TABS_TO_SPACES ||
|
|
||||||
flag == USE_MOUSE) {
|
|
||||||
bool enabled = ISSET(flag);
|
bool enabled = ISSET(flag);
|
||||||
|
|
||||||
if (flag == NO_HELP || flag == NO_SYNTAX)
|
if (flag == NO_HELP || flag == NO_SYNTAX)
|
||||||
|
|
Loading…
Reference in New Issue