aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/aerc.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index cfc42919..5dda8882 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -527,7 +527,7 @@ func (aerc *Aerc) Mailto(addr *url.URL) error {
var subject string
h := &mail.Header{}
to, err := mail.ParseAddressList(addr.Opaque)
- if err != nil {
+ if err != nil && addr.Opaque != "" {
return fmt.Errorf("Could not parse to: %v", err)
}
h.SetAddressList("to", to)
@@ -567,6 +567,9 @@ func (aerc *Aerc) Mailto(addr *url.URL) error {
title = subject
composer.FocusTerminal()
}
+ if to == nil {
+ composer.FocusRecipient()
+ }
tab := aerc.NewTab(composer, title)
composer.OnHeaderChange("Subject", func(subject string) {
if subject == "" {