Skip to content

Conversation

@jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Jun 30, 2025

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.

@jeremypw jeremypw added this to the 8.1 milestone Jun 30, 2025
@jeremypw jeremypw marked this pull request as ready for review June 30, 2025 13:59
@jeremypw jeremypw added the Priority: High To be addressed after any critical issues label Jul 3, 2025
Copy link
Contributor

@zeebok zeebok left a 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

@jeremypw
Copy link
Collaborator Author

@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.

@zeebok
Copy link
Contributor

zeebok commented Jul 23, 2025

@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 this is it will highlight this is on the other line. But if I try to select a test it will only highlight test on the other line.

Maybe that is an unrelated bug? When I do repro though it no longer crashes, that is for sure!

@jeremypw
Copy link
Collaborator Author

@zeebok Looks like that issue you identified also occurs with master so I'll fix that separately. Thanks for checking!

@jeremypw jeremypw merged commit 5e578f6 into master Jul 23, 2025
6 checks passed
@jeremypw jeremypw deleted the jeremypw/fix-highlight-crash branch July 23, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: High To be addressed after any critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code crashes when deleting lines

3 participants