mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-17 21:18:31 +02:00
stop refreshing item when at end of list
This commit is contained in:
parent
86dd9d87dd
commit
9125e3c0c6
@ -161,6 +161,11 @@ func (lc *ListContext) handleLineChange(change int) error {
|
||||
return err
|
||||
}
|
||||
|
||||
selectedLineIdx := lc.GetPanelState().GetSelectedLineIdx()
|
||||
if (change < 0 && selectedLineIdx == 0) || (change > 0 && selectedLineIdx == lc.GetItemsLength()-1) {
|
||||
return nil
|
||||
}
|
||||
|
||||
lc.Gui.changeSelectedLine(lc.GetPanelState(), lc.GetItemsLength(), change)
|
||||
view.FocusPoint(0, lc.GetPanelState().GetSelectedLineIdx())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user