fix(choose): Fix paging up bug

Fixes https://github.com/charmbracelet/gum/issues/82
This commit is contained in:
Maas Lalani 2022-08-02 11:20:28 -04:00
parent 378a000f70
commit 7eb1e7e322

View file

@ -62,7 +62,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
case "up", "k", "ctrl+p":
m.index = clamp(m.index-1, 0, len(m.items)-1)
if m.index <= start {
if m.index < start {
m.paginator.PrevPage()
}
case "right", "l", "ctrl+f":