aboutsummaryrefslogtreecommitdiffstats
path: root/commands/commands.go
diff options
context:
space:
mode:
authorkt programs <ktprograms@gmail.com>2022-03-15 09:55:50 +0800
committerRobin Jarry <robin@jarry.cc>2022-03-16 17:02:29 +0100
commita16bd053211440f95e2badfd280c3e58ef107c70 (patch)
treef17c6d61a742cea4e36db0988482eafd34f00954 /commands/commands.go
parent2a19c30879de90b8b902a2804204cfac15c1cd90 (diff)
downloadaerc-a16bd053211440f95e2badfd280c3e58ef107c70.tar.gz
commands: fix possible panic in CompletionFromList
Panic might occur if aerc.SelectedAccount() is nil Signed-off-by: kt programs <ktprograms@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/commands.go')
-rw-r--r--commands/commands.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/commands.go b/commands/commands.go
index d0ff562f..2753686f 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 {