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:
2026-10-21 12:31:40 +02:00
co-authored by Claude Opus 5.5
parent 191cfdbabb
commit b49bb1ef31
2 changed files with 44 additions and 2 deletions
+7 -2
View File
@@ -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