tweaks: reshuffle help-text initialization, to elide a save-and-restore
parent
ac9550d4c2
commit
443e1484e5
21
src/help.c
21
src/help.c
|
@ -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)
|
||||||
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)
|
||||||
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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. */
|
||||||
|
|
Loading…
Reference in New Issue