Simplify condition and add comment - scroll - scrollbackbuffer program for st | |
git clone git://git.suckless.org/scroll | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit f69ab9f5ad7cca80b924220cd3e92e4779267793 | |
parent 66f97243ff888b8cdcd69b57d3abdaf58a070ec9 | |
Author: Jochen Sprickerhof <[email protected]> | |
Date: Sun, 12 Apr 2020 23:06:13 +0200 | |
Simplify condition and add comment | |
Diffstat: | |
M scroll.c | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/scroll.c b/scroll.c | |
@@ -270,7 +270,7 @@ redraw() | |
rows < ws.ws_row; rows++) | |
bottom = TAILQ_NEXT(bottom, entries); | |
- if (rows <= 0) | |
+ if (rows == 0) | |
return; | |
/* clear screen */ | |
@@ -329,6 +329,7 @@ scrollup(int n) | |
bottom = TAILQ_NEXT(bottom, entries); | |
write(STDOUT_FILENO, scrollend->buf, scrollend->size); | |
} | |
+ /* move cursor from line n to the bottom */ | |
dprintf(STDOUT_FILENO, "\033[%d;0H", ws.ws_row); | |
} | |