tweaks: be more sparing in redrawing things when exiting from help viewer

That is: don't redraw the title bar twice, don't redraw the bottom bars
twice, nor unnecessarily redraw the whole screen.
This commit is contained in:
Benno Schulenberg 2019-05-31 10:18:22 +02:00
parent 122cabd3ba
commit 5817e83e33
1 changed files with 6 additions and 4 deletions

View File

@ -236,6 +236,7 @@ void do_help(void)
tabsize = was_tabsize;
#ifdef ENABLE_COLOR
syntaxstr = was_syntax;
have_palette = FALSE;
#endif
free(title);
@ -246,21 +247,22 @@ void do_help(void)
inhelp = FALSE;
curs_set(0);
refresh_needed = TRUE;
if (ISSET(NO_HELP)) {
currmenu = oldmenu;
window_init();
} else
} else {
wipe_statusbar();
bottombars(oldmenu);
prepare_for_display();
}
#ifdef ENABLE_BROWSER
if (oldmenu == MBROWSER || oldmenu == MWHEREISFILE || oldmenu == MGOTODIR)
browser_refresh();
else
#endif
total_refresh();
titlebar(NULL);
}
/* Allocate space for the help text for the current menu, and concatenate