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 upwards selection not being cleared when lines change #3028

Merged

Conversation

Luflosi
Copy link
Contributor

@Luflosi Luflosi commented Oct 13, 2020

When selecting text by dragging upwards, the "end" of the selection is above the "start". This causes the selection_has_screen_line() to never return true in this case.
In practice this bug causes the selection to not be cleared when the screen contents under the selection change if it was made by dragging upwards.

Please double-check that s->start_scrolled_by and s->end_scrolled_by don't need to be subtracted from top and bottom instead as I'm not sure.

When selecting text by dragging upwards, the "end" of the selection is above the "start". This causes the `selection_has_screen_line()` to never return `true` in this case.
In practice this bug causes the selection to not be cleared when the screen contents under the selection change if it was made by dragging upwards.
@kovidgoyal kovidgoyal merged commit 8a90ed7 into kovidgoyal:master Oct 14, 2020
@Luflosi Luflosi deleted the fix-upwards-selection-clearing branch October 14, 2020 00:02
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

2 participants