Fix crash from highlight selection plugin when deleting selection#1622
Fix crash from highlight selection plugin when deleting selection#1622
Conversation
zeebok
left a comment
There was a problem hiding this comment.
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.