-
-
Notifications
You must be signed in to change notification settings - Fork 113
Fix crash from highlight selection plugin when deleting selection #1622
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
Conversation
zeebok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. If you would like testing, let me know
|
@zeebok Thanks for looking at this. If you have time to try and "break" it that would be good. It is always better for someone else to test as the author tends to develop blind spots. |
@jeremypw So when I tested with the repro text, if I select Maybe that is an unrelated bug? When I do repro though it no longer crashes, that is for sure! |
|
@zeebok Looks like that issue you identified also occurs with master so I'll fix that separately. Thanks for checking! |
Fixes #1443
The cause seems to be a clash between the handlers for the "selection-changed" and "deselected" signals in the plugin. One is throttled and the other not.
For simplicity the "deselected" signal is lost (only used by the plugin) and a deselection now triggers a throttled "selection-changed" signal.
The highlighting of a current search continues to override the plugin highlighting.
There is a noticeable delay in updating the highlighting after deletion but this ensures the textview has finished updating.