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

Highlights flicker on settings change for x-model occurrences #224321

Closed
Yoyokrazy opened this issue Jul 30, 2024 · 2 comments · Fixed by #224415
Closed

Highlights flicker on settings change for x-model occurrences #224321

Yoyokrazy opened this issue Jul 30, 2024 · 2 comments · Fixed by #224415
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-highlight Editor selection/word highlight issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@Yoyokrazy
Copy link
Contributor

Yoyokrazy commented Jul 30, 2024

wordHighlighter will trigger a `this._run()` for each open and visible editor. also triggers a `_stopAll()` for one of these workerRequests. 

need to iron out the behavior with one of the editors as the "driver"

Originally posted by @Yoyokrazy in #196356 (comment)

@Yoyokrazy Yoyokrazy self-assigned this Jul 30, 2024
@Yoyokrazy Yoyokrazy added bug Issue identified by VS Code Team member as probable bug editor-highlight Editor selection/word highlight issues labels Jul 30, 2024
@Yoyokrazy
Copy link
Contributor Author

issue:

  • change settings
  • for each visible editor
    • configuration change event
    • hit wordHighlighter.ts however many editors # of times
    • 🐛 triggers a this._run() which subsequently triggers a stopAll() causing a flicker
    • workerReq debouncing limits the flicker to only happening once regardless of how many more editors there are.

@Yoyokrazy
Copy link
Contributor Author

potential fix:
at the beginning of _run, maybe just check to see if you're the driver model (which is stored in the query). If not the driver, don't execute the run (because it's already happening)

Anyway, can probably leverage the preservedModel parameter implemented in #224243 to remove the flicker. probably just better overall. No cases where highlights get stuck either, so win win? will investigate

@Yoyokrazy Yoyokrazy added this to the August 2024 milestone Jul 31, 2024
@vs-code-engineering vs-code-engineering bot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 24, 2024
@justschen justschen added the verified Verification succeeded label Aug 29, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-highlight Editor selection/word highlight issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants