diff options
author | Michael Vetter <jubalh@iodoru.org> | 2022-06-29 15:37:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-29 15:37:07 +0200 |
commit | 5aa515ddfef4f8ca1ccae27493f8eafb5f63e8a8 (patch) | |
tree | b5c8709d22d9883f26ce590cd10b7a9cc939360a | |
parent | 449c7ce2bad75438e5cff6733366e0ada153a23e (diff) | |
parent | c84b1b5e5d038684a6a475a251b738c3c5ffb9a5 (diff) | |
download | profani-tty-5aa515ddfef4f8ca1ccae27493f8eafb5f63e8a8.tar.gz |
Merge pull request #1730 from profanity-im/fix/scrolling
Don't scroll if not needed
-rw-r--r-- | src/ui/window.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 7bd403da..e25002d6 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -598,6 +598,10 @@ win_page_up(ProfWin* window) int page_space = rows - 4; int* page_start = &(window->layout->y_pos); + // dont need to scroll + if (*page_start == 0) + return; + *page_start -= page_space; // went past beginning, show first page |