Fix off-by-one error in viewport's GotoBottom()

This was most likely introduced by the fix for rendering final lines in
0ac5ecdf81.
This commit is contained in:
Christian Rocha 2022-01-18 12:18:50 -05:00
parent 6c015a2aa8
commit 7a6d306889

View File

@ -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()
}