Tab cycles panels within a view; views switch only via F1-F4/Alt+digit

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 19:22:24 +02:00
co-authored by Claude Sonnet 5.5
parent 0b4af81203
commit 093fe53291
6 changed files with 25 additions and 18 deletions
+5 -1
View File
@@ -70,7 +70,7 @@ func newSearchView(app *App, be backend, cfg config.Arr) *searchView {
case tcell.KeyEnter:
v.search(strings.TrimSpace(v.input.GetText()))
v.app.app.SetFocus(v.list)
case tcell.KeyEscape, tcell.KeyTab:
case tcell.KeyEscape, tcell.KeyTab, tcell.KeyBacktab:
v.app.app.SetFocus(v.list)
}
})
@@ -85,6 +85,10 @@ func newSearchView(app *App, be backend, cfg config.Arr) *searchView {
v.list.SetChangedFunc(func(i int, _, _ string, _ rune) { v.showDetails(i) })
v.list.SetSelectedFunc(func(i int, _, _ string, _ rune) { v.add(i) })
v.list.SetInputCapture(func(ev *tcell.EventKey) *tcell.EventKey {
if ev.Key() == tcell.KeyTab || ev.Key() == tcell.KeyBacktab {
v.app.app.SetFocus(v.input)
return nil
}
if ev.Key() != tcell.KeyRune {
return ev
}