From: Ali Gholami Rudi Date: Thu, 19 Sep 2013 05:33:01 +0000 (+0430) Subject: fbpad: do not redraw the whole screen if it was already visible X-Git-Url: https://repo.or.cz/w/fbpad.git/commitdiff_plain/f4140adc0f5ad9dc2cceac40c4755e45e37c05b7 fbpad: do not redraw the whole screen if it was already visible --- diff --git a/fbpad.c b/fbpad.c index 5bd90ef..81f1fc7 100644 --- a/fbpad.c +++ b/fbpad.c @@ -89,8 +89,9 @@ static void switchterm(int oidx, int nidx, int show, int save, int load) scr_snap(&terms[oidx]); term_save(&terms[oidx]); term_load(&terms[nidx], show); - if (load) - term_redraw(!TERMOPEN(nidx) || !TERMSNAP(nidx) || scr_load(&terms[nidx])); + if (show) + term_redraw(load && (!TERMOPEN(nidx) || !TERMSNAP(nidx) || + scr_load(&terms[nidx]))); } static void showterm(int n) diff --git a/term.c b/term.c index 416329d..f24315d 100644 --- a/term.c +++ b/term.c @@ -359,7 +359,8 @@ void term_redraw(int all) } lazy_flush(); } else { - pad_blank(0); + if (all) + pad_blank(0); } }