diff --git a/plugins/github/github-core/src/org/jetbrains/plugins/github/pullrequest/ui/diff/GHPRReviewDiffExtension.kt b/plugins/github/github-core/src/org/jetbrains/plugins/github/pullrequest/ui/diff/GHPRReviewDiffExtension.kt index bbae08552904..15a28dc4142a 100644 --- a/plugins/github/github-core/src/org/jetbrains/plugins/github/pullrequest/ui/diff/GHPRReviewDiffExtension.kt +++ b/plugins/github/github-core/src/org/jetbrains/plugins/github/pullrequest/ui/diff/GHPRReviewDiffExtension.kt @@ -192,7 +192,9 @@ private class DiffEditorModel( Side.LEFT -> range.end1 Side.RIGHT -> range.end2 } - val end = locationToLine(side to endLineIdx.dec())?.inc() ?: return null + val end = + if (startLineIdx == endLineIdx) start + else locationToLine(side to endLineIdx.dec())?.inc() ?: return null return LineRange(start, end) }