Arrow keys on the Config view's server dropdowns
The form navigation recognised dropdowns only as *tview.DropDown, so on the new profile and folder dropdowns ←→ did nothing and ↑↓ left an open list instead of moving through it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
This commit is contained in:
+7
-2
@@ -116,8 +116,13 @@ func focusedDropDown(f *tview.Form, item int) (*tview.DropDown, bool) {
|
||||
if item < 0 {
|
||||
return nil, false
|
||||
}
|
||||
dd, ok := f.GetFormItem(item).(*tview.DropDown)
|
||||
return dd, ok
|
||||
switch it := f.GetFormItem(item).(type) {
|
||||
case *tview.DropDown:
|
||||
return it, true
|
||||
case *serverChoice: // a dropdown with extras; the keys work the same
|
||||
return it.DropDown, true
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// bindSearchNow keeps a "Search now" checkbox consistent with whether a search
|
||||
|
||||
Reference in New Issue
Block a user