aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-18 07:18:35 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-18 07:18:35 +0530
commit75724f9e3b6463d44081a5c48b68a0b28a69ef4a (patch)
tree00b7bb0f009bbdd8247f41958a2f134b70cf1230 /src
parente38c0108ba70d7cdce30a12e2a46d67f233cbcda (diff)
downloadnnn-75724f9e3b6463d44081a5c48b68a0b28a69ef4a.tar.gz
Fix #520: minimal erasure
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nnn.c b/src/nnn.c
index b6460f9..1ecfc38 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4938,14 +4938,15 @@ static void redraw(char *path)
DPRINTF_S(__FUNCTION__);
- /* Clear screen */
- erase();
+ /* Go to first line */
+ move(0, 0);
/* Enforce scroll/cursor invariants */
move_cursor(cur, 1);
/* Fail redraw if < than 10 columns, context info prints 10 chars */
if (ncols < MIN_DISPLAY_COLS) {
+ clrtobot();
printmsg(messages[MSG_FEW_COLUMNS]);
return;
}
@@ -4997,8 +4998,8 @@ static void redraw(char *path)
attroff(A_UNDERLINE);
- /* Go to first entry */
- move(2, 0);
+ /* Clear everthing till first entry */
+ addstr("\n\n");
ncols = adjust_cols(ncols);
@@ -5015,6 +5016,9 @@ static void redraw(char *path)
cfg.dircolor = 0;
}
+ /* Clear from last entry to end */
+ clrtobot();
+
statusbar(path);
}