commit 443e1484e5c0d62fe6f3b81653d267ec94a4e631
parent ac9550d4c248f75994529f1dd2b2f834a4be3247
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 1 May 2017 17:32:50 +0200
tweaks: reshuffle help-text initialization, to elide a save-and-restore
Diffstat:
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/src/help.c b/src/help.c
@@ -128,12 +128,6 @@ void do_help(void)
fclose(fp);
- /* Compose the help text from all the pieces. */
- tabsize = 8;
- help_init();
- inhelp = TRUE;
- location = 0;
-
/* Save the settings of all flags. */
memcpy(stash, flags, sizeof(flags));
@@ -156,6 +150,12 @@ void do_help(void)
UNSET(LINE_NUMBERS);
margin = 0;
#endif
+ tabsize = 8;
+
+ /* Compose the help text from all the pieces. */
+ help_init();
+ inhelp = TRUE;
+ location = 0;
bottombars(MHELP);
wnoutrefresh(bottomwin);
@@ -296,12 +296,6 @@ void help_init(void)
const subnfunc *f;
const sc *s;
-#ifndef NANO_TINY
- bool old_whitespace = ISSET(WHITESPACE_DISPLAY);
-
- UNSET(WHITESPACE_DISPLAY);
-#endif
-
/* First, set up the initial help text for the current function. */
if (currmenu == MWHEREIS || currmenu == MREPLACE || currmenu == MREPLACEWITH) {
htx[0] = N_("Search Command Help Text\n\n "
@@ -561,9 +555,6 @@ void help_init(void)
}
}
}
-
- if (old_whitespace)
- SET(WHITESPACE_DISPLAY);
#endif /* !NANO_TINY */
/* If all went well, we didn't overwrite the allocated space. */