IAE: RangeMarkerImpl.<init>
#EA-141884 Fixed
This commit is contained in:
@@ -298,8 +298,9 @@ class SelectionAwareScopeHighlighter(val editor: Editor) {
|
|||||||
|
|
||||||
val attributes = EditorColorsManager.getInstance().globalScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)!!
|
val attributes = EditorColorsManager.getInstance().globalScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)!!
|
||||||
val selectedRange = with(editor.selectionModel) { TextRange(selectionStart, selectionEnd) }
|
val selectedRange = with(editor.selectionModel) { TextRange(selectionStart, selectionEnd) }
|
||||||
|
val textLength = editor.document.textLength
|
||||||
for (r in RangeSplitter.split(affectedRange, Collections.singletonList(selectedRange))) {
|
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 attributes = EditorColorsManager.getInstance().globalScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)!!
|
||||||
val selectedRange = with(editor.selectionModel) { TextRange(selectionStart, selectionEnd) }
|
val selectedRange = with(editor.selectionModel) { TextRange(selectionStart, selectionEnd) }
|
||||||
|
val textLength = editor.document.textLength
|
||||||
for (r in RangeSplitter.split(affectedRange, Collections.singletonList(selectedRange))) {
|
for (r in RangeSplitter.split(affectedRange, Collections.singletonList(selectedRange))) {
|
||||||
addHighlighter(r, attributes)
|
if (r.endOffset <= textLength) addHighlighter(r, attributes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user