Skip to content

Commit b9511a9

Browse files
authored
Adjust WordHighlighter to use hasTextFocus() instead of hasWidgetFocus() (microsoft#203754)
Potential fix for microsoft#201814
1 parent 84bdd34 commit b9511a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ class WordHighlighter {
491491

492492
private _stopAll(): void {
493493
// Remove any existing decorations
494+
// TODO: @Yoyokrazy - this triggers as notebooks scroll, causing highlights to disappear momentarily.
494495
this._removeAllDecorations();
495496

496497
// Cancel any renderDecorationsTimer
@@ -608,7 +609,7 @@ class WordHighlighter {
608609
private _run(): void {
609610

610611
let workerRequestIsValid;
611-
if (!this.editor.hasWidgetFocus()) { // no focus (new nb cell, etc)
612+
if (!this.editor.hasTextFocus()) { // no focus (new nb cell, etc)
612613
if (WordHighlighter.query === null) {
613614
// no previous query, nothing to highlight
614615
return;

0 commit comments

Comments
 (0)