~sircmpwn/aerc

Check the subject line for lowercase re v1 PROPOSED

Thanks!

To git.sr.ht:~sircmpwn/aerc
   f6216bb..282dc44  master -> master
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/aerc/%3C20190907184217.13622-1-dev%40jeffas.io%3E/mbox | git am -3
Learn more about email & git

[PATCH] Check the subject line for lowercase re Export this patch

This ensures that a message with e.g. "RE: " at the start won't get
another "Re: ".
---
 commands/msg/reply.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 34d03d5..44e44b3 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -103,7 +103,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
 	}

 	var subject string
-	if !strings.HasPrefix(msg.Envelope.Subject, "Re: ") {
+	if !strings.HasPrefix(strings.ToLower(msg.Envelope.Subject), "re: ") {
 		subject = "Re: " + msg.Envelope.Subject
 	} else {
 		subject = msg.Envelope.Subject
--
2.23.0
Thanks!

To git.sr.ht:~sircmpwn/aerc
   f6216bb..282dc44  master -> master
View this thread in the archives