bindings: fix panic for terminal keybind

Fix panic in the GetCompletions function when using the keybind for the
terminal command.

Fixes: https://todo.sr.ht/~rjarry/aerc/29
Reported-by: inwit <inwit@sindominio.net>
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Koni Marti 2022-03-14 12:49:09 +01:00 committed by Robin Jarry
parent 74366d895d
commit 7d9ae36977
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ func (cmds *Commands) GetCompletions(aerc *widgets.Aerc, cmd string) []string {
// complete available commands // complete available commands
names := cmds.Names() names := cmds.Names()
options := FilterList(names, args[0], "", aerc.SelectedAccount().UiConfig().FuzzyComplete) options := FilterList(names, args[0], "", aerc.SelectedAccountUiConfig().FuzzyComplete)
if len(options) > 0 { if len(options) > 0 {
return options return options