提交 b9b4b51e 编写于 作者: S Serge Rider

SQL editor: selection highlight fix (do not highlight for 1 char selection)


Former-commit-id: e32581c4
上级 7bdf4290
......@@ -1430,13 +1430,17 @@ public abstract class SQLEditorBase extends BaseTextEditor implements DBPContext
}
}
OccurrencesFinder finder = new OccurrencesFinder(document, wordUnderCursor, wordSelected);
List<OccurrencePosition> positions = finder.perform();
if (!CommonUtils.isEmpty(positions)) {
this.occurrencesFinderJob = new OccurrencesFinderJob(positions);
this.occurrencesFinderJob.run(new NullProgressMonitor());
} else {
if (CommonUtils.isEmpty(wordSelected) || wordSelected.length() < 2) {
this.removeOccurrenceAnnotations();
} else {
OccurrencesFinder finder = new OccurrencesFinder(document, wordUnderCursor, wordSelected);
List<OccurrencePosition> positions = finder.perform();
if (!CommonUtils.isEmpty(positions)) {
this.occurrencesFinderJob = new OccurrencesFinderJob(positions);
this.occurrencesFinderJob.run(new NullProgressMonitor());
} else {
this.removeOccurrenceAnnotations();
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册