diff --git a/viewport/viewport.go b/viewport/viewport.go index 1835b8d..11c6da7 100644 --- a/viewport/viewport.go +++ b/viewport/viewport.go @@ -140,7 +140,7 @@ func (m *Model) SetContent(s string) { // maxYOffset returns the maximum possible value of the y-offset based on the // viewport's content and set height. func (m Model) maxYOffset() int { - return max(0, len(m.lines)-m.Height) + return max(0, len(m.lines)-m.Height+m.Style.GetVerticalFrameSize()) } // visibleLines returns the lines that should currently be visible in the