diff options
author | Mark Kopenga <mkopenga@gmail.com> | 2018-11-14 11:34:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-14 11:34:39 +0100 |
commit | 6d2bf0b0b52f390cfaff2388b2b13d99f3b6fdc3 (patch) | |
tree | 8be050aecd6a751e8a80a177d8d265d203d0c6fc /pkg/gui | |
parent | 0c4c00c1bf62d82064f8a4dc14bdb1169a051865 (diff) | |
parent | cc7d78f1ee8dcf92105afcbf13c2ce0d2b5e175c (diff) |
Merge branch 'master' into https-ask-for-username-password
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/gui.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 60d22f4e9..6d42aee48 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -131,7 +131,12 @@ func (gui *Gui) scrollUpMain(g *gocui.Gui, v *gocui.View) error { func (gui *Gui) scrollDownMain(g *gocui.Gui, v *gocui.View) error { mainView, _ := g.View("main") ox, oy := mainView.Origin() - if oy < len(mainView.BufferLines()) { + y := oy + if !gui.Config.GetUserConfig().GetBool("gui.scrollPastBottom") { + _, sy := mainView.Size() + y += sy + } + if y < len(mainView.BufferLines()) { return mainView.SetOrigin(ox, oy+gui.Config.GetUserConfig().GetInt("gui.scrollHeight")) } return nil |