From 7f97e0b605f739983571fa85289ea9dc57218f3d Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 16 May 2019 12:42:46 -0400 Subject: [PATCH] Don't prefix Re: if prefix already present --- commands/account/reply.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/account/reply.go b/commands/account/reply.go index 803c616..84e7614 100644 --- a/commands/account/reply.go +++ b/commands/account/reply.go @@ -74,7 +74,12 @@ func Reply(aerc *widgets.Aerc, args []string) error { } } - subject := "Re: " + msg.Envelope.Subject + var subject string + if !strings.HasPrefix(msg.Envelope.Subject, "Re: ") { + subject = "Re: " + msg.Envelope.Subject + } else { + subject = msg.Envelope.Subject + } composer := widgets.NewComposer( aerc.Config(), acct.AccountConfig(), acct.Worker()).