show cursor if we are at the bottom - scroll - scrollbackbuffer program for st
(HTM) git clone git://git.suckless.org/scroll
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 72a1aa0c7b1a71f8a2305861bc89d17d7a897053
(DIR) parent 8afdc10fd50174fc2f567d371401834277bf1c40
(HTM) Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Sat, 25 Apr 2020 22:56:39 +0200
show cursor if we are at the bottom
Diffstat:
M scroll.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/scroll.c b/scroll.c
@@ -284,9 +284,10 @@ redraw()
write(STDOUT_FILENO, bottom->buf, bottom->size);
}
- if (bottom == TAILQ_FIRST(&head))
+ if (bottom == TAILQ_FIRST(&head)) {
write(STDOUT_FILENO, "\n", 1);
- else
+ write(STDOUT_FILENO, "\033[?25h", 6); /* show cursor */
+ } else
bottom = TAILQ_NEXT(bottom, entries);
}