[hackers] [scroll] show cursor if we are at the bottom || Jochen Sprickerhof

From: <git_AT_suckless.org>
Date: Sat, 25 Apr 2020 22:57:01 +0200 (CEST)

commit 72a1aa0c7b1a71f8a2305861bc89d17d7a897053
Author: Jochen Sprickerhof <git_AT_jochen.sprickerhof.de>
AuthorDate: Sat Apr 25 22:56:39 2020 +0200
Commit: Jochen Sprickerhof <git_AT_jochen.sprickerhof.de>
CommitDate: Sat Apr 25 22:56:39 2020 +0200

    show cursor if we are at the bottom

diff --git a/scroll.c b/scroll.c
index 8cda0f6..722ea01 100644
--- a/scroll.c
+++ b/scroll.c
_AT_@ -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);
 }
 
Received on Sat Apr 25 2020 - 22:57:01 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 25 2020 - 23:00:38 CEST