1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

remove viper

WIP
This commit is contained in:
Jesse Duffield
2020-10-03 14:54:55 +10:00
parent 9440dcf9de
commit 4912205adb
272 changed files with 10788 additions and 59939 deletions

View File

@@ -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