summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-01-12 13:26:10 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-01-12 13:55:14 +1100
commit77a82e9d51aa789e51fc9ecd863187cc82aedf61 (patch)
tree17ffb78315d6c801574ae20a09d85520de03ce6f /pkg/gui/gui.go
parentbd79c2e8dcf66fbc70239572ee0da4bf8849f824 (diff)
use view line height to see if you should stop scrolling
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go2
1 files changed, 1 insertions, 1 deletions
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
}