From 11e5390fa0acbcc609ca177777548dd2d725afbc Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Wed, 27 Jul 2022 23:39:16 +0200 Subject: compose: implement embedded headers in editor Implement embedded header mode in the composer widget. To activate it, use set [compose].edit-headers=true in aerc.conf. Signed-off-by: Koni Marti Signed-off-by: Robin Jarry Tested-by: Bence Ferdinandy --- commands/compose/cc-bcc.go | 4 ++-- commands/compose/header.go | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'commands/compose') diff --git a/commands/compose/cc-bcc.go b/commands/compose/cc-bcc.go index 17e925e1..045f9092 100644 --- a/commands/compose/cc-bcc.go +++ b/commands/compose/cc-bcc.go @@ -29,9 +29,9 @@ func (CC) Execute(aerc *widgets.Aerc, args []string) error { switch args[0] { case "cc": - composer.AddEditor("Cc", addrs, true) + return composer.AddEditor("Cc", addrs, true) case "bcc": - composer.AddEditor("Bcc", addrs, true) + return composer.AddEditor("Bcc", addrs, true) } return nil diff --git a/commands/compose/header.go b/commands/compose/header.go index 46cc23b9..c512e341 100644 --- a/commands/compose/header.go +++ b/commands/compose/header.go @@ -72,7 +72,5 @@ func (Header) Execute(aerc *widgets.Aerc, args []string) error { } } - composer.AddEditor(args[optind], value, false) - - return nil + return composer.AddEditor(args[optind], value, false) } -- cgit