diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-12-29 11:50:20 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-04 09:07:15 +1100 |
commit | 01ea5813a8e3b8e914332002e744e3328f55f6cd (patch) | |
tree | 5684bcf7f081c5230518394ddc732316e36674e7 /pkg/gui/global_handlers.go | |
parent | 03b946cc8f9e94fe3fd53ac619ace2af2662aac2 (diff) |
align Gui struct with GitCommand
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 e0f05ca44..83abe6535 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -64,7 +64,7 @@ func (gui *Gui) prevScreenMode() error { func (gui *Gui) scrollUpView(view *gocui.View) error { ox, oy := view.Origin() - newOy := int(math.Max(0, float64(oy-gui.Config.GetUserConfig().Gui.ScrollHeight))) + newOy := int(math.Max(0, float64(oy-gui.UserConfig.Gui.ScrollHeight))) return view.SetOrigin(ox, newOy) } @@ -86,12 +86,12 @@ func (gui *Gui) scrollDownView(view *gocui.View) error { func (gui *Gui) linesToScrollDown(view *gocui.View) int { _, oy := view.Origin() y := oy - canScrollPastBottom := gui.Config.GetUserConfig().Gui.ScrollPastBottom + canScrollPastBottom := gui.UserConfig.Gui.ScrollPastBottom if !canScrollPastBottom { _, sy := view.Size() y += sy } - scrollHeight := gui.Config.GetUserConfig().Gui.ScrollHeight + scrollHeight := gui.UserConfig.Gui.ScrollHeight scrollableLines := view.ViewLinesHeight() - y if scrollableLines < 0 { return 0 |