From c9ad8c77086d124d4ba9f48f30c99d75a0ba951c Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Sat, 19 Jun 2021 10:47:09 -0400 Subject: fix screen leftover artifacts Always clear the main window before redrawing. --- src/tui.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/tui.c b/src/tui.c index be0006c..17a4f58 100644 --- a/src/tui.c +++ b/src/tui.c @@ -403,13 +403,6 @@ void ui_update(int header) { #endif if (header) { - // Clean from top to bottom - wmove(main_win, 0, 0); - wclrtobot(main_win); - - // comment this to prevent info message to be erased - //wmove(input_win, 0, 0); - //wclrtobot(input_win); ui_show_celldetails(); // always before ui_print_mode ui_print_mode(); wrefresh(input_win); @@ -830,6 +823,9 @@ int ui_show_content(WINDOW * win, int nb_mobile_rows, int nb_mobile_cols) { int mobile_rows = nb_mobile_rows; int total_rows = nb_mobile_rows + sh->nb_frozen_rows; + wmove(win, winrow, 0); + wclrtobot(win); + for (row = 0; row < sh->maxrows && total_rows > 0; row++) { if (sh->row_hidden[row]) continue; -- cgit v1.2.3