Skip to content

Commit

Permalink
Candidate: Fix stuck highlighting when `"editor.occurrencesHighlight"…
Browse files Browse the repository at this point in the history
…: "off"` (#206559)

occurrence off fix
  • Loading branch information
Yoyokrazy authored Mar 1, 2024
1 parent a7d4436 commit 0727ad7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ class WordHighlighter {
this._onPositionChanged(e);
}));
this.toUnhook.add(editor.onDidFocusEditorText((e) => {
if (this.occurrencesHighlight === 'off') {
// Early exit if nothing needs to be done
return;
}

if (!this.workerRequest) {
this._run();
}
Expand Down

0 comments on commit 0727ad7

Please sign in to comment.