File tree Expand file tree Collapse file tree
src/vs/editor/contrib/find/common Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ) {
You can’t perform that action at this time.
0 commit comments