[debugger] Fix invalid line number

It seems there was an error because PSI files count niles from zero, but jdi.Location counts it from one.

GitOrigin-RevId: b6c4fa4a291ed869402682500af3c53b68e28da0
This commit is contained in:
Alexey Merkulov
2023-10-27 16:15:50 +02:00
committed by intellij-monorepo-bot
parent 2b3ece365f
commit 4612d8a5e6

View File

@@ -242,7 +242,7 @@ class KotlinPositionManager(private val debugProcess: DebugProcess) : MultiReque
}
private fun Location.hasFinallyBlockInParent(psiFile: PsiFile): Boolean {
val elementAt = psiFile.getLineStartOffset(lineNumber())?.let { psiFile.findElementAt(it) }
val elementAt = psiFile.getLineStartOffset(getZeroBasedLineNumber())?.let { psiFile.findElementAt(it) }
return elementAt?.parentOfType<KtFinallySection>() != null
}