Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageUp/PageDown for jumps smaller than a whole page #419

Closed
grawity opened this issue Jul 8, 2021 · 1 comment
Closed

PageUp/PageDown for jumps smaller than a whole page #419

grawity opened this issue Jul 8, 2021 · 1 comment

Comments

@grawity
Copy link

grawity commented Jul 8, 2021

Did a discussion occur before?

Probably not

Is your feature request related to a problem? Please describe.

In many other tools (htop, mutt, ncdu, tig, tmux, most text editors), the convention is that pressing PageUp or PageDown always moves the cursor to that direction – e.g. when the cursor is e.g. on the 5th item, PageUp still moves it to the 1st. And similarly, even if there's only one page and no scrollbar, PageUp still moves to the top and PageDown moves to the bottom (like Home/End).

I'm always confused when I press them in broot and get no reaction at all, and only then notice that there's no scrollbar and realize that I'm supposed to use different keys in that situation. (Or, tbh, sometimes I just move the cursor around for no reason while thinking.)

Describe the solution you'd like

If the remaining amount of items to scroll is less than a full page, PageUp should behave like Home and jump to the 1st item (instead of doing nothing), and PageDown should behave like End and jump to the last item.

Describe alternatives you've considered

I could re-learn to look at the scrollbar first and press Home/End when there's just one page, I guess.

@Canop
Copy link
Owner

Canop commented Jul 15, 2021

Interestingly enough, that's not what happens in vi. PageUp and PageDown don't move the cursor if the document is short enough.

But I see no objection in moving it anyway if there's less than a page.

@Canop Canop closed this as completed in c68e7f3 Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants