From 77a82e9d51aa789e51fc9ecd863187cc82aedf61 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 12 Jan 2020 13:26:10 +1100 Subject: [PATCH] use view line height to see if you should stop scrolling --- pkg/gui/gui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index d748b4d72..08242da53 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -265,7 +265,7 @@ func (gui *Gui) scrollDownView(viewName string) error { y += sy } scrollHeight := gui.Config.GetUserConfig().GetInt("gui.scrollHeight") - if y < len(mainView.BufferLines()) { + if y < mainView.LinesHeight() { if err := mainView.SetOrigin(ox, oy+scrollHeight); err != nil { return err }