diff --git a/viewport/viewport.go b/viewport/viewport.go index ee89208..f40ed76 100644 --- a/viewport/viewport.go +++ b/viewport/viewport.go @@ -213,7 +213,7 @@ func (m *Model) GotoTop() (lines []string) { // GotoBottom sets the viewport to the bottom position. func (m *Model) GotoBottom() (lines []string) { - m.SetYOffset(len(m.lines) - 1 - m.Height) + m.SetYOffset(len(m.lines) - m.Height) return m.visibleLines() }