diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-11 12:12:54 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-11 17:07:49 +1000 |
commit | 4f03d7733ab186d357064f343915ac48ca059940 (patch) | |
tree | 258437fad6568feaafe1c4a19e2a47c66fc92c5c /pkg/gui/global_handlers.go | |
parent | e3a14d546aa31851e6ab26dcdb21336ad94365c7 (diff) |
allow showing, hiding, and scrolling the extras panel
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r-- | pkg/gui/global_handlers.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go index cea8be8b0..92bb1fee4 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -113,7 +113,7 @@ func (gui *Gui) linesToScrollDown(view *gocui.View) int { } func (gui *Gui) atScrollBottom(view *gocui.View) bool { - return gui.linesToScrollDown(view) > 0 + return gui.linesToScrollDown(view) == 0 } func (gui *Gui) scrollUpMain() error { @@ -147,14 +147,14 @@ func (gui *Gui) scrollUpExtra() error { } func (gui *Gui) scrollDownExtra() error { - if err := gui.scrollDownView(gui.Views.Extras); err != nil { - return err - } - if gui.atScrollBottom(gui.Views.Extras) { gui.Views.Extras.Autoscroll = true } + if err := gui.scrollDownView(gui.Views.Extras); err != nil { + return err + } + return nil } |