diff --git a/src/global.c b/src/global.c index 2f041a12..6ccfbc58 100644 --- a/src/global.c +++ b/src/global.c @@ -1512,7 +1512,7 @@ void shortcut_init(void) #ifndef NANO_TINY /* Return the textual description that corresponds to the given flag. */ -const char *flagtostr(int flag) +const char *epithet_of_flag(int flag) { switch (flag) { case NO_HELP: diff --git a/src/help.c b/src/help.c index 53c6a981..a34501d7 100644 --- a/src/help.c +++ b/src/help.c @@ -235,7 +235,7 @@ void help_init(void) for (s = sclist; s != NULL; s = s->next) if (s->func == do_toggle) - allocsize += strlen(_(flagtostr(s->toggle))) + onoff_len + 9; + allocsize += strlen(_(epithet_of_flag(s->toggle))) + onoff_len + 9; } #endif @@ -303,7 +303,7 @@ void help_init(void) for (s = sclist; s != NULL; s = s->next) if (s->toggle && s->ordinal == counter) { ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus & MMAIN ? s->keystr : ""), - _(flagtostr(s->toggle)), _("enable/disable")); + _(epithet_of_flag(s->toggle)), _("enable/disable")); /* Add a blank like between two groups. */ if (s->toggle == NO_SYNTAX) ptr += sprintf(ptr, "\n"); diff --git a/src/nano.c b/src/nano.c index 500c4a18..bf60ad9a 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1077,6 +1077,8 @@ void toggle_this(int flag) case ZERO: window_init(); draw_all_subwindows(); + if (flag == ZERO) + return; break; case CONSTANT_SHOW: if (ISSET(ZERO) || LINES == 1) { @@ -1114,9 +1116,6 @@ void toggle_this(int flag) #endif } - if (flag == ZERO) - return; - if (ISSET(STATEFLAGS) && !ISSET(ZERO) && (flag == AUTOINDENT || flag == BREAK_LONG_LINES || flag == SOFTWRAP)) { if (ISSET(MINIBAR)) @@ -1131,7 +1130,7 @@ void toggle_this(int flag) if (flag == NO_HELP || flag == NO_SYNTAX) enabled = !enabled; - statusline(REMARK, "%s %s", _(flagtostr(flag)), + statusline(REMARK, "%s %s", _(epithet_of_flag(flag)), enabled ? _("enabled") : _("disabled")); } #endif /* !NANO_TINY */ diff --git a/src/prototypes.h b/src/prototypes.h index 907e6f80..705bdca6 100644 --- a/src/prototypes.h +++ b/src/prototypes.h @@ -323,7 +323,7 @@ functionptrtype interpret(int *keycode); #endif int keycode_from_string(const char *keystring); void shortcut_init(void); -const char *flagtostr(int flag); +const char *epithet_of_flag(int flag); /* Some functions in help.c. */ #ifdef ENABLE_HELP