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 panic when buffer larger than terminal width #70

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

RLHerbert
Copy link
Contributor

Possible fix for #69.

@IceDragon200
Copy link
Contributor

And this doesn't have any unexpected side effects? Such as wrapping the cursor into places it really shouldn't be?

@RLHerbert
Copy link
Contributor Author

RLHerbert commented Jun 3, 2021

I didn't see any when testing and I don't see why it would. This change should only affect the situation when underflow occurs and it panics, since I replaced the raw subtract with saturating_sub. If it does cause such an error then there is probably an architectural problem.

Edit: There is a visual bug that occurs on resizing the window, where if the cursor is at the end of the window and the text exceeds the terminal width, increasing the window size doesn't move the text to accommodate for the new room, but I get that regardless of this fix.

@archseer archseer merged commit 3c77299 into helix-editor:master Jun 3, 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

Successfully merging this pull request may close these issues.

None yet

3 participants