tweaks: switch to the preceding buffer in a cheaper way (when in help)
When a help-text buffer is closed while exiting from the help viewer, the rest of the exit code takes care that the preceding buffer gets displayed properly. And when a help-text buffer is closed because a SIGWINCH occurred, doing anything for the preceding buffer is a waste of time because a new help-text buffer will be opened and displayed instantly.master
parent
71574e7a6f
commit
5f03c20ea0
|
@ -239,7 +239,7 @@ void do_help(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Switch back to the buffer we were invoked from. */
|
/* Switch back to the buffer we were invoked from. */
|
||||||
switch_to_prev_buffer();
|
openfile = openfile->prev;
|
||||||
|
|
||||||
if (ISSET(NO_HELP)) {
|
if (ISSET(NO_HELP)) {
|
||||||
currmenu = oldmenu;
|
currmenu = oldmenu;
|
||||||
|
|
|
@ -3375,7 +3375,7 @@ void total_refresh(void)
|
||||||
#ifdef ENABLE_HELP
|
#ifdef ENABLE_HELP
|
||||||
if (inhelp) {
|
if (inhelp) {
|
||||||
close_buffer();
|
close_buffer();
|
||||||
switch_to_prev_buffer();
|
openfile = openfile->prev;
|
||||||
wrap_help_text_into_buffer();
|
wrap_help_text_into_buffer();
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue