Closed azat closed 1 year ago
I'd probably scroll by the screen height minus 1 (but with a minimum of 1), so the last line before pressing scroll-down is still visible at the top. What do you think?
Initially I did the same as less
does - it scroll the whole page page (on PageUp/PageDown).
I think that here it is better to preserve behavior of some existing tool, and less
looks like a good example to follow.
But if you still think that the last line should be preserved, I've pushed a patch on top that does this, feel free to apply either only the first one, or the whole patch set.
Indeed, it seems different application use different configurations:
less
, more
, bat
seem to keep no line, and show an entire "new page" with page-down (or space).nvim
seems to preserve 2 lines, my gedit 5 lines, ...).I agree that scroller should probably behave more like a pager than an editor (editable views like TextArea
would implement their own page-down handling).
I merged the first commit.
Hi, and thanks for the PR!
I'd probably scroll by the screen height minus 1 (but with a minimum of 1), so the last line before pressing scroll-down is still visible at the top. What do you think?