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

Fix bug where viewport doesn't render final lines #74

Merged
merged 2 commits into from Sep 17, 2021

Conversation

meowgorithm
Copy link
Member

This update fixes a bug where final lines wouldn't be rendered in viewports when doing standard (non-performance) rendering. I supposed we never noticed this because many of our files and strings tended to have a final newline (in the latter case, perhaps to work around the bug).

This update also contains a fix where the performance renderer could consume one line too many if the y-position of the viewport was greater than 0.

This update also introduces a method for setting a viewport's y-offset, Model.ViewSetYOffset(int), which contains some safeguards for keeping the y-offset in bounds.

In a future release, the Model.YOffset member, an int, will be replaced with a getter.

Fixes #73.

This previously went unnoticed because we all seemed to have newlines at
the end of our viewport input.

This update introduces the Model.SetYOffset method.
@meowgorithm meowgorithm merged commit 0ac5ecd into master Sep 17, 2021
@meowgorithm meowgorithm deleted the viewport-final-line-fix branch September 17, 2021 20:39
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.

viewport: last line of content not rendered when scrolling if it doesn't end with new line \n
1 participant