Revert "Skip a complete erase on redraw()"

This reverts commit 41d414c2fc.
This commit is contained in:
Arun Prakash Jana 2021-05-06 22:33:30 +05:30
parent 765986b916
commit 0d21813b11

View file

@ -5751,19 +5751,18 @@ static void redraw(char *path)
DPRINTF_S(__func__); DPRINTF_S(__func__);
/* Fail redraw if < than 10 columns, context info prints 10 chars */ /* Clear screen */
/* Note: this should be before the Fast redraw, but we optimize */
if (ncols <= MIN_DISPLAY_COLS) {
erase(); erase();
/* Enforce scroll/cursor invariants */
move_cursor(cur, 1);
/* Fail redraw if < than 10 columns, context info prints 10 chars */
if (ncols < MIN_DISPLAY_COLS) {
printmsg(messages[MSG_FEW_COLUMNS]); printmsg(messages[MSG_FEW_COLUMNS]);
return; return;
} }
move(0, 0);
/* Enforce scroll/cursor invariants */
//move_cursor(cur, 1);
//DPRINTF_D(cur); //DPRINTF_D(cur);
DPRINTF_S(path); DPRINTF_S(path);
@ -5824,13 +5823,11 @@ static void redraw(char *path)
ncols = adjust_cols(ncols); ncols = adjust_cols(ncols);
clrtoeol(); /* Clear to end of first line */
move(1, 0);
/* Go to first entry */ /* Go to first entry */
if (curscroll > 0) if (curscroll > 0) {
move(1, 0);
addch('^'); addch('^');
clrtoeol(); /* Clear to end of second line */ }
move(2, 0); move(2, 0);
@ -5849,8 +5846,6 @@ static void redraw(char *path)
g_state.dircolor = 0; g_state.dircolor = 0;
} }
clrtobot(); /* clear to end of screen */
/* Go to first entry */ /* Go to first entry */
if (i < ndents) { if (i < ndents) {
move(xlines - 2, 0); move(xlines - 2, 0);