Commit 443e1484 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: reshuffle help-text initialization, to elide a save-and-restore

No related merge requests found
Showing with 6 additions and 15 deletions
+6 -15
...@@ -128,12 +128,6 @@ void do_help(void) ...@@ -128,12 +128,6 @@ void do_help(void)
fclose(fp); fclose(fp);
/* Compose the help text from all the pieces. */
tabsize = 8;
help_init();
inhelp = TRUE;
location = 0;
/* Save the settings of all flags. */ /* Save the settings of all flags. */
memcpy(stash, flags, sizeof(flags)); memcpy(stash, flags, sizeof(flags));
...@@ -156,6 +150,12 @@ void do_help(void) ...@@ -156,6 +150,12 @@ void do_help(void)
UNSET(LINE_NUMBERS); UNSET(LINE_NUMBERS);
margin = 0; margin = 0;
#endif #endif
tabsize = 8;
/* Compose the help text from all the pieces. */
help_init();
inhelp = TRUE;
location = 0;
bottombars(MHELP); bottombars(MHELP);
wnoutrefresh(bottomwin); wnoutrefresh(bottomwin);
...@@ -296,12 +296,6 @@ void help_init(void) ...@@ -296,12 +296,6 @@ void help_init(void)
const subnfunc *f; const subnfunc *f;
const sc *s; 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. */ /* First, set up the initial help text for the current function. */
if (currmenu == MWHEREIS || currmenu == MREPLACE || currmenu == MREPLACEWITH) { if (currmenu == MWHEREIS || currmenu == MREPLACE || currmenu == MREPLACEWITH) {
htx[0] = N_("Search Command Help Text\n\n " htx[0] = N_("Search Command Help Text\n\n "
...@@ -561,9 +555,6 @@ void help_init(void) ...@@ -561,9 +555,6 @@ void help_init(void)
} }
} }
} }
if (old_whitespace)
SET(WHITESPACE_DISPLAY);
#endif /* !NANO_TINY */ #endif /* !NANO_TINY */
/* If all went well, we didn't overwrite the allocated space. */ /* If all went well, we didn't overwrite the allocated space. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment