diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-03 14:54:55 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | 4912205adb5e8e245b33b8e0d5581bcf0ec37e8a (patch) | |
tree | 90e28657c0af72cd0a880842f88750c01a32834d /pkg/gui/global_handlers.go | |
parent | 9440dcf9de3214927125693e512cdc941ca4e123 (diff) |
remove viper
WIP
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r-- | pkg/gui/global_handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go index ddbb2e542..99fea388c 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -39,7 +39,7 @@ func (gui *Gui) scrollUpView(viewName string) error { return nil } ox, oy := mainView.Origin() - newOy := int(math.Max(0, float64(oy-gui.Config.GetUserConfig().GetInt("gui.scrollHeight")))) + newOy := int(math.Max(0, float64(oy-gui.Config.GetUserConfig().Gui.ScrollHeight))) return mainView.SetOrigin(ox, newOy) } @@ -50,11 +50,11 @@ func (gui *Gui) scrollDownView(viewName string) error { } ox, oy := mainView.Origin() y := oy - if !gui.Config.GetUserConfig().GetBool("gui.scrollPastBottom") { + if !gui.Config.GetUserConfig().Gui.ScrollPastBottom { _, sy := mainView.Size() y += sy } - scrollHeight := gui.Config.GetUserConfig().GetInt("gui.scrollHeight") + scrollHeight := gui.Config.GetUserConfig().Gui.ScrollHeight if y < mainView.LinesHeight() { if err := mainView.SetOrigin(ox, oy+scrollHeight); err != nil { return err |