From a16bd053211440f95e2badfd280c3e58ef107c70 Mon Sep 17 00:00:00 2001 From: kt programs Date: Tue, 15 Mar 2022 09:55:50 +0800 Subject: [PATCH] commands: fix possible panic in CompletionFromList Panic might occur if aerc.SelectedAccount() is nil Signed-off-by: kt programs Acked-by: Robin Jarry --- commands/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/commands.go b/commands/commands.go index d0ff562..2753686 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -129,7 +129,7 @@ func CompletionFromList(aerc *widgets.Aerc, valid []string, args []string) []str if len(args) == 0 { return valid } - return FilterList(valid, args[0], "", aerc.SelectedAccount().UiConfig().FuzzyComplete) + return FilterList(valid, args[0], "", aerc.SelectedAccountUiConfig().FuzzyComplete) } func GetLabels(aerc *widgets.Aerc, args []string) []string {