提交 95336995 编写于 作者: A Alex Dima

Fixes #24426: editor.occurrencesHighlight should be honoured by SelectionHighlighter

上级 705fe98d
......@@ -876,13 +876,16 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd
}
private _update(): void {
let model = this.editor.getModel();
const model = this.editor.getModel();
if (!model) {
return;
}
const config = this.editor.getConfiguration();
this.lastWordUnderCursor = null;
if (!this.editor.getConfiguration().contribInfo.selectionHighlight) {
if (!config.contribInfo.selectionHighlight) {
this.removeDecorations();
return;
}
......@@ -905,6 +908,11 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd
return;
}
if (!config.contribInfo.occurrencesHighlight) {
this.removeDecorations();
return;
}
this.lastWordUnderCursor = r.currentMatch;
}
if (/^[ \t]+$/.test(r.searchText)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册