diff --git a/pkg/gui/patch_exploring/focus.go b/pkg/gui/patch_exploring/focus.go index 3548f09d4..cf917cd4d 100644 --- a/pkg/gui/patch_exploring/focus.go +++ b/pkg/gui/patch_exploring/focus.go @@ -22,7 +22,7 @@ func calculateNewOriginWithNeededAndWantedIdx(currentOrigin int, bufferHeight in allowedChange := bottom - needToSeeIdx return origin - min(requiredChange, allowedChange) } else if wantToSeeIdx >= bottom { - requiredChange := wantToSeeIdx - bottom + requiredChange := wantToSeeIdx + 1 - bottom allowedChange := needToSeeIdx - origin return origin + min(requiredChange, allowedChange) }