about summary refs log tree commit diff stats
path: root/commands/account/reply.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-16 12:42:46 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-16 12:42:46 -0400
commit7f97e0b605f739983571fa85289ea9dc57218f3d (patch)
treef92d582522be35b76ae312075e3a708cbbdceb49 /commands/account/reply.go
parente367469e1a557a6536c021c9d9569307045ef989 (diff)
downloadaerc-7f97e0b605f739983571fa85289ea9dc57218f3d.tar.gz
Don't prefix Re: if prefix already present
Diffstat (limited to 'commands/account/reply.go')
-rw-r--r--commands/account/reply.go7
1 files changed, 6 insertions, 1 deletions
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()).
19 13:26:10 -0400 committer Drew DeVault <sir@cmpwn.com> 2019-07-19 17:33:30 -0400 Use latest go-maildir' href='/akspecs/aerc/commit/go.mod?h=0.5.0&id=66d916aa7b73bb5fe76d1b9c9eb6a95215caee52'>66d916a ^
840b5bd ^
b0eaf51 ^
0c2ede5 ^
6473848 ^
0c2ede5 ^
8d20e92 ^
d394fd1 ^
0c2ede5 ^

475b697 ^
0c2ede5 ^
56b84d3 ^
b0bf09b ^
513e8aa ^
cef784b ^
16c3f0a ^
0c2ede5 ^
072bc26 ^
8d20e92 ^
b0eaf51 ^
0c2ede5 ^
072bc26 ^
3836d24 ^
56b84d3 ^
ab79bc3 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38