aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/reply.go
diff options
context:
space:
mode:
authorDaniel Bridges <bridges2@gmail.com>2019-07-22 16:29:07 -0700
committerDrew DeVault <sir@cmpwn.com>2019-07-26 14:22:04 -0400
commit67fb0938a66605a0b6a837005804637b348b250d (patch)
treeb9bb363185b248ae8eed29e7b8388d8a71433d3e /commands/msg/reply.go
parent1b673b5ea7d06ef914e9d48ff7299f8b5f2119fd (diff)
downloadaerc-67fb0938a66605a0b6a837005804637b348b250d.tar.gz
Support configurable header layout in compose widget
Diffstat (limited to 'commands/msg/reply.go')
-rw-r--r--commands/msg/reply.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 85c5d3ab..029cb42b 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -113,14 +113,15 @@ func (_ reply) Execute(aerc *widgets.Aerc, args []string) error {
}
}
+ defaults := map[string]string{
+ "To": strings.Join(to, ", "),
+ "Cc": strings.Join(cc, ", "),
+ "Subject": subject,
+ "In-Reply-To": msg.Envelope.MessageId,
+ }
+
composer := widgets.NewComposer(
- aerc.Config(), acct.AccountConfig(), acct.Worker()).
- Defaults(map[string]string{
- "To": strings.Join(to, ", "),
- "Cc": strings.Join(cc, ", "),
- "Subject": subject,
- "In-Reply-To": msg.Envelope.MessageId,
- })
+ aerc.Config(), acct.AccountConfig(), acct.Worker(), defaults)
if args[0] == "reply" {
composer.FocusTerminal()
@@ -128,7 +129,7 @@ func (_ reply) Execute(aerc *widgets.Aerc, args []string) error {
addTab := func() {
tab := aerc.NewTab(composer, subject)
- composer.OnSubjectChange(func(subject string) {
+ composer.OnHeaderChange("Subject", func(subject string) {
if subject == "" {
tab.Name = "New email"
} else {