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

Limit right paging to text #174

Merged
merged 2 commits into from
Dec 28, 2023

Conversation

emanuel-skrenkovic
Copy link
Contributor

Hi!

The change:
When paging right, it was possible to infinitely go to the right. This changes that so it is only possible to go right until the last visible character is out of the screen. Only the lines that are currently on screen are taken into account for the limit.


I'm not sure if this change is wanted by anyone but me, but, suspiciously often, I somehow end up scrolling way past the end of the text to the right so I've decided to make a change to stop that from happening.

I figured I'd make a PR in case this behavior is something more people want, if not, feel free to close.

Also, the limit ignores whitespace to the right of the characters.
I've only tested with a few sample files, and not all options though. If needed, I can test a bit more comprehensively and make changes to the code.

When paging right, it was possible to infinitely go to the right. This
commit changes that so it is only possible to go right until the last
visible character is out of screen.
@walles walles merged commit 7940474 into walles:master Dec 28, 2023
2 checks passed
@walles
Copy link
Owner

walles commented Dec 28, 2023

Thanks Emanuel! ⭐

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

Successfully merging this pull request may close these issues.

2 participants