Fix EA-76946 - IOOBE: LineSet.checkLineIndex: do not try to get line start offset for line out off document
This commit is contained in:
@@ -290,7 +290,7 @@ public class SelectionAwareScopeHighlighter(val editor: Editor) {
|
||||
|
||||
fun PsiFile.getLineStartOffset(line: Int): Int? {
|
||||
val doc = PsiDocumentManager.getInstance(project).getDocument(this)
|
||||
if (doc != null) {
|
||||
if (doc != null && line <= doc.lineCount) {
|
||||
val startOffset = doc.getLineStartOffset(line)
|
||||
val element = findElementAt(startOffset) ?: return startOffset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user