File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,19 @@ func (m selectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
140
140
}
141
141
142
142
case tea .KeyUp :
143
+ options := m .filteredOptions ()
143
144
if m .cursor > 0 {
144
145
m .cursor --
146
+ } else {
147
+ m .cursor = len (options ) - 1
145
148
}
146
149
147
150
case tea .KeyDown :
148
151
options := m .filteredOptions ()
149
152
if m .cursor < len (options )- 1 {
150
153
m .cursor ++
154
+ } else {
155
+ m .cursor = 0
151
156
}
152
157
}
153
158
}
@@ -332,13 +337,19 @@ func (m multiSelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
332
337
}
333
338
334
339
case tea .KeyUp :
340
+ options := m .filteredOptions ()
335
341
if m .cursor > 0 {
336
342
m .cursor --
343
+ } else {
344
+ m .cursor = len (options ) - 1
337
345
}
338
346
339
347
case tea .KeyDown :
340
- if m .cursor < len (m .options )- 1 {
348
+ options := m .filteredOptions ()
349
+ if m .cursor < len (options )- 1 {
341
350
m .cursor ++
351
+ } else {
352
+ m .cursor = 0
342
353
}
343
354
344
355
case tea .KeyRight :
You can’t perform that action at this time.
0 commit comments