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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user