Skip to content

Commit 0727ad7

Browse files
authored
Candidate: Fix stuck highlighting when "editor.occurrencesHighlight": "off" (#206559)
occurrence off fix
1 parent a7d4436 commit 0727ad7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,11 @@ class WordHighlighter {
310310
this._onPositionChanged(e);
311311
}));
312312
this.toUnhook.add(editor.onDidFocusEditorText((e) => {
313+
if (this.occurrencesHighlight === 'off') {
314+
// Early exit if nothing needs to be done
315+
return;
316+
}
317+
313318
if (!this.workerRequest) {
314319
this._run();
315320
}

0 commit comments

Comments
 (0)