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

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

上级 08002651
......@@ -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.
先完成此消息的编辑!
想要评论请 注册