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

allow showing, hiding, and scrolling the extras panel

This commit is contained in:
Jesse Duffield
2021-04-11 12:12:54 +10:00
parent e3a14d546a
commit 4f03d7733a
7 changed files with 40 additions and 9 deletions

View File

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