diff --git a/platform/diff-impl/src/com/intellij/openapi/vcs/ex/DocumentTracker.kt b/platform/diff-impl/src/com/intellij/openapi/vcs/ex/DocumentTracker.kt index 1b3108b0f3fc..d9dffd9f0dc7 100644 --- a/platform/diff-impl/src/com/intellij/openapi/vcs/ex/DocumentTracker.kt +++ b/platform/diff-impl/src/com/intellij/openapi/vcs/ex/DocumentTracker.kt @@ -370,7 +370,7 @@ class DocumentTracker : Disposable { private fun getAffectedRange(line1: Int, oldLine2: Int, newLine2: Int, e: DocumentEvent): Triple { val afterLength = newLine2 - line1 - val beforeLength = line2 - line1 + val beforeLength = oldLine2 - line1 // Whole line insertion / deletion if (e.oldLength == 0 && e.newLength != 0) {