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

Don't scroll horizontally more than the longest line #54

Open
notramo opened this issue Mar 23, 2018 · 2 comments
Open

Don't scroll horizontally more than the longest line #54

notramo opened this issue Mar 23, 2018 · 2 comments

Comments

@notramo
Copy link

notramo commented Mar 23, 2018

For example, a file contains 80 character long lines. If the -> key is pressed, it scrolls horizontally. If it is pressed again, it scrolls again, although there is no text. It seems to me it don't have a limit to horizontal scrolling.

@tigrawap
Copy link
Owner

I don't think "fixing" this will be right thing to do.
No way to know longest line in future. (ofc can save longest line found so far, but not reliably)

Now imagine:
150 chars line
many short chart lines
150 chars line

Long lines are the interesting lines, so I align screen to them and start scrolling vertically
If it will restrain to shortest line on screen - then will have to scroll right again to see interesting line

The only viable option, is to restrict horizontal scrolling to longest line only if it's invoked directly on current screen.

I'll see what can be done... but right now positioning and drawing are very different entities with no cross-communication

@notramo
Copy link
Author

notramo commented Mar 26, 2018

What about allowing scrolling to the length of the longest line always?
With your example, if only the many short lines are on the screen, it would allow also to scroll 150 characters.

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