diff --git a/src/files.c b/src/files.c index 529ed362ec6ad756b49980a08397c8d6bcc99d8d..f56b9725f0af66aba67923fbacca2f0f8d0626ab 100644 --- a/src/files.c +++ b/src/files.c @@ -631,9 +631,14 @@ void switch_to_prevnext_buffer(bool to_next) /* Update titlebar and multiline info to match the current buffer. */ prepare_for_display(); + if (inhelp) + return; + + /* Ensure that the main loop will redraw the help lines. */ + currmenu = MMOST; + /* Indicate the switch on the statusbar. */ - if (!inhelp) - statusline(HUSH, _("Switched to %s"), + statusline(HUSH, _("Switched to %s"), ((openfile->filename[0] == '\0') ? _("New Buffer") : openfile->filename)); @@ -677,7 +682,7 @@ bool close_buffer(void) /* Close the file buffer we had open before. */ unlink_opennode(openfile->prev); - /* If only one buffer is open now, show Exit in the help lines. */ + /* If now just one buffer remains open, show "Exit" in the help lines. */ if (openfile == openfile->next) exitfunc->desc = exit_tag; diff --git a/src/nano.c b/src/nano.c index f2a7edbbc16a4b4e3012fd07d8bf84f65c55ffd2..ac2e56bf6335aafc38a60573ebe1ca8ee634597c 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2613,7 +2613,8 @@ int main(int argc, char **argv) } #endif - display_main_list(); + if (currmenu != MMAIN) + display_main_list(); lastmessage = HUSH; as_an_at = TRUE; diff --git a/src/text.c b/src/text.c index c2b1fa3e3d2e6ba58be3df27276afcc2cd50b71b..6569059ff90674931e5d75a0db5048c627b93206 100644 --- a/src/text.c +++ b/src/text.c @@ -2511,8 +2511,9 @@ void do_justify(bool full_justify) blank_statusbar(); wnoutrefresh(bottomwin); - /* Show "Uncut" again in the help lines. */ + /* Show "Uncut" again in the help lines, and force their redrawing. */ uncutfunc->desc = uncut_tag; + currmenu = MMOST; } /* Justify the current paragraph. */