~sircmpwn/aerc

Check the subject line for lowercase re v1 PROPOSED

Jeffas: 1
 Check the subject line for lowercase re

 1 files changed, 1 insertions(+), 1 deletions(-)
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/patches/8013/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