Fix #520: minimal erasure

This commit is contained in:
Arun Prakash Jana 2020-04-18 07:18:35 +05:30
parent e38c0108ba
commit 75724f9e3b
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -4938,14 +4938,15 @@ static void redraw(char *path)
DPRINTF_S(__FUNCTION__); DPRINTF_S(__FUNCTION__);
/* Clear screen */ /* Go to first line */
erase(); move(0, 0);
/* Enforce scroll/cursor invariants */ /* Enforce scroll/cursor invariants */
move_cursor(cur, 1); move_cursor(cur, 1);
/* Fail redraw if < than 10 columns, context info prints 10 chars */ /* Fail redraw if < than 10 columns, context info prints 10 chars */
if (ncols < MIN_DISPLAY_COLS) { if (ncols < MIN_DISPLAY_COLS) {
clrtobot();
printmsg(messages[MSG_FEW_COLUMNS]); printmsg(messages[MSG_FEW_COLUMNS]);
return; return;
} }
@ -4997,8 +4998,8 @@ static void redraw(char *path)
attroff(A_UNDERLINE); attroff(A_UNDERLINE);
/* Go to first entry */ /* Clear everthing till first entry */
move(2, 0); addstr("\n\n");
ncols = adjust_cols(ncols); ncols = adjust_cols(ncols);
@ -5015,6 +5016,9 @@ static void redraw(char *path)
cfg.dircolor = 0; cfg.dircolor = 0;
} }
/* Clear from last entry to end */
clrtobot();
statusbar(path); statusbar(path);
} }