提交 90dd1cd8 编写于 作者: A Alex Dima

Fixes #64: Do not render selectionHighlight on top of selection

上级 d5135434
......@@ -516,6 +516,16 @@ export class SelectionHighlighter implements EditorCommon.IEditorContribution {
var matches = this.editor.getModel().findMatches(r.searchText, true, r.isRegex, r.matchCase, r.wholeWord);
// do not overlap with selection (issue #64)
let editorSelection = this.editor.getSelection();
matches = matches.filter((m) => {
if (editorSelection.equalsRange(m)) {
return false;
}
return true;
});
var decorations = matches.map(r => {
return {
range: r,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册