mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
exception
This commit is contained in:
+2
-1
@@ -207,7 +207,8 @@ abstract class RangeHighlighterData {
|
||||
public int getAffectedAreaStartOffset() {
|
||||
int startOffset = getRangeHighlighter().getStartOffset();
|
||||
if (getTargetArea() == HighlighterTargetArea.EXACT_RANGE) return startOffset;
|
||||
if (startOffset == myModel.getDocument().getTextLength()) return startOffset;
|
||||
int textLength = myModel.getDocument().getTextLength();
|
||||
if (startOffset >= textLength) return textLength;
|
||||
return myModel.getDocument().getLineStartOffset(myModel.getDocument().getLineNumber(startOffset));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user