commit f69ab9f5ad7cca80b924220cd3e92e4779267793
Author:     Jochen Sprickerhof <[email protected]>
AuthorDate: Sun Apr 12 23:06:13 2020 +0200
Commit:     Jochen Sprickerhof <[email protected]>
CommitDate: Sun Apr 12 23:06:13 2020 +0200

    Simplify condition and add comment

diff --git a/scroll.c b/scroll.c
index c35e7bc..02dd9d6 100644
--- 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);
 }
 

Reply via email to