summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pitre <nico@fluxnic.net>2021-06-19 10:47:09 -0400
committerNicolas Pitre <nico@fluxnic.net>2021-06-19 10:47:09 -0400
commitc9ad8c77086d124d4ba9f48f30c99d75a0ba951c (patch)
tree93ab5db6ec9e007dc2e023e7d2be6c60586c55e7
parent793bc4899f6433690b714828423c5c298bdf0f79 (diff)
fix screen leftover artifacts
Always clear the main window before redrawing.
-rw-r--r--src/tui.c10
1 files 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;