IAE: RangeMarkerImpl.<init>

#EA-141884 Fixed
This commit is contained in:
Vladimir Dolzhenko
2020-01-09 15:55:21 +01:00
parent 83c3763096
commit 8d3e4a2965
2 changed files with 4 additions and 2 deletions
@@ -298,8 +298,9 @@ class SelectionAwareScopeHighlighter(val editor: Editor) {
val attributes = EditorColorsManager.getInstance().globalScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)!!
val selectedRange = with(editor.selectionModel) { TextRange(selectionStart, selectionEnd) }
val textLength = editor.document.textLength
for (r in RangeSplitter.split(affectedRange, Collections.singletonList(selectedRange))) {
addHighlighter(r, attributes)
if (r.endOffset <= textLength) addHighlighter(r, attributes)
}
}
@@ -297,8 +297,9 @@ class SelectionAwareScopeHighlighter(val editor: Editor) {
val attributes = EditorColorsManager.getInstance().globalScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)!!
val selectedRange = with(editor.selectionModel) { TextRange(selectionStart, selectionEnd) }
val textLength = editor.document.textLength
for (r in RangeSplitter.split(affectedRange, Collections.singletonList(selectedRange))) {
addHighlighter(r, attributes)
if (r.endOffset <= textLength) addHighlighter(r, attributes)
}
}