mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not try to restore invalid caret position (EA-37531 - ISE: SegmentArray.findSegmentIndex;IDEA-90171)
This commit is contained in:
@@ -404,7 +404,7 @@ public abstract class LogConsoleBase extends AdditionalTabComponent implements L
|
||||
LOG.assertTrue(editor != null);
|
||||
final Document document = editor.getDocument();
|
||||
final int caretOffset = editor.getCaretModel().getOffset();
|
||||
if (caretOffset > -1) {
|
||||
if (caretOffset > -1 && caretOffset < document.getTextLength()) {
|
||||
int line;
|
||||
try {
|
||||
line = document.getLineNumber(caretOffset);
|
||||
|
||||
Reference in New Issue
Block a user