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 highlighting after reselection of same word #1484

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 22, 2024

Fixes #1483

  • Ensure selection is updated in plugin when selection changes by clicking elsewhere
  • Simplify and DRY some code

Throttling the update-spaces function was tried but the resulting lag was found to be distracting so now they are updated straight-away as before. This is inefficient but any improvement can be left for another PR.

@jeremypw jeremypw marked this pull request as ready for review October 22, 2024 18:21
@jeremypw jeremypw requested a review from zeebok October 22, 2024 18:21
@jeremypw
Copy link
Collaborator Author

@zeebok You may like to take a look at this and let me know if by any chance it also fixes the crashing problem we discussed.

zeebok
zeebok previously approved these changes Dec 1, 2024
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.

This works as expected though it seems slightly slower, particularly with removing the highlight after clicking elsewhere. Not sure if there is a way to fix that before merging but I think it could also be a separate PR if you wanted

@jeremypw jeremypw requested a review from zeebok December 2, 2024 12:54
@jeremypw
Copy link
Collaborator Author

jeremypw commented Dec 2, 2024

@zeebok I see what you mean. I have now separated the throttle for the selection change signal so that can be faster. Could you reproduce the crash on BackSpace issue with this PR?

@jeremypw jeremypw requested a review from a team January 8, 2025 16:42
@jeremypw jeremypw dismissed zeebok’s stale review January 8, 2025 16:43

Significant changes made since review

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.

Highlight word selection: Does not work when reselecting the same word
2 participants