summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/list_context.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/gui/list_context.go b/pkg/gui/list_context.go
index c360b2f2a..0edd80873 100644
--- a/pkg/gui/list_context.go
+++ b/pkg/gui/list_context.go
@@ -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())