nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 5f03c20ea0a8832cf1db43ef0b9d39ab278929f1
parent 71574e7a6f23231cfcb9153f27c8e0451d7d7090
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 29 May 2019 19:27:13 +0200

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.

Diffstat:
Msrc/help.c | 2+-
Msrc/winio.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/help.c b/src/help.c @@ -239,7 +239,7 @@ void do_help(void) #endif /* Switch back to the buffer we were invoked from. */ - switch_to_prev_buffer(); + openfile = openfile->prev; if (ISSET(NO_HELP)) { currmenu = oldmenu; diff --git a/src/winio.c b/src/winio.c @@ -3375,7 +3375,7 @@ void total_refresh(void) #ifdef ENABLE_HELP if (inhelp) { close_buffer(); - switch_to_prev_buffer(); + openfile = openfile->prev; wrap_help_text_into_buffer(); } else #endif