commit 2f696500f791925b6d5cdff3268e57f2fbc3a2a9
Author:     Jochen Sprickerhof <[email protected]>
AuthorDate: Sat Apr 25 23:32:04 2020 +0200
Commit:     Jochen Sprickerhof <[email protected]>
CommitDate: Sat Apr 25 23:32:04 2020 +0200

    Fix cursor position in scrollup

diff --git a/scroll.c b/scroll.c
index 9ff5398..652eba9 100644
--- a/scroll.c
+++ b/scroll.c
@@ -340,7 +340,7 @@ scrollup(int n)
        }
        /* move cursor from line n to the old bottom position */
        if (y + n < ws.ws_row) {
-               dprintf(STDOUT_FILENO, "\033[%d;%dH", y + n, y);
+               dprintf(STDOUT_FILENO, "\033[%d;%dH", y + n, x);
                write(STDOUT_FILENO, "\033[?25h", 6);   /* show cursor */
        } else
                dprintf(STDOUT_FILENO, "\033[%d;0H", ws.ws_row);

Reply via email to