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