Skip to content

Commit 9533699

Browse files
committed
Fixes microsoft#24426: editor.occurrencesHighlight should be honoured by SelectionHighlighter
1 parent 705fe98 commit 9533699

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/vs/editor/contrib/find/common/findController.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,13 +876,16 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd
876876
}
877877

878878
private _update(): void {
879-
let model = this.editor.getModel();
879+
const model = this.editor.getModel();
880880
if (!model) {
881881
return;
882882
}
883883

884+
const config = this.editor.getConfiguration();
885+
884886
this.lastWordUnderCursor = null;
885-
if (!this.editor.getConfiguration().contribInfo.selectionHighlight) {
887+
if (!config.contribInfo.selectionHighlight) {
888+
this.removeDecorations();
886889
return;
887890
}
888891

@@ -905,6 +908,11 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd
905908
return;
906909
}
907910

911+
if (!config.contribInfo.occurrencesHighlight) {
912+
this.removeDecorations();
913+
return;
914+
}
915+
908916
this.lastWordUnderCursor = r.currentMatch;
909917
}
910918
if (/^[ \t]+$/.test(r.searchText)) {

0 commit comments

Comments
 (0)