[hackers] [scroll] Don't scrollup if history is empty || Jochen Sprickerhof

From: <git_AT_suckless.org>
Date: Sun, 19 Apr 2020 23:58:33 +0200 (CEST)

commit bbdc448cf73235f0f9a9c02b679c9e6e46bfc5fd
Author: Jochen Sprickerhof <git_AT_jochen.sprickerhof.de>
AuthorDate: Sun Apr 19 21:28:35 2020 +0200
Commit: Jochen Sprickerhof <git_AT_jochen.sprickerhof.de>
CommitDate: Sun Apr 19 21:28:35 2020 +0200

    Don't scrollup if history is empty

diff --git a/scroll.c b/scroll.c
index d1e28c0..f5f79f7 100644
--- a/scroll.c
+++ b/scroll.c
_AT_@ -304,7 +304,7 @@ scrollup(int n)
 
         rows -= x;
 
- if (rows <= 0)
+ if (scrollend == NULL || rows <= 0)
                 return;
 
         /* move the text in terminal rows lines down */
Received on Sun Apr 19 2020 - 23:58:33 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 20 2020 - 00:00:54 CEST