From ae675b491d2b55a06588e8ab4ce8205aaae796c8 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Tue, 20 Dec 2022 17:05:43 +0100 Subject: templates: change fields as lazy functions No need to pre-render fields that are not necessarily accessed in templates. Change fields to functions that are evaluated only when required. Signed-off-by: Robin Jarry Acked-by: Tim Culverhouse --- commands/msg/forward.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands/msg/forward.go') diff --git a/commands/msg/forward.go b/commands/msg/forward.go index 9a4f3d41..90c32ec2 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -101,7 +101,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error { addTab := func() (*widgets.Composer, error) { composer, err := widgets.NewComposer(aerc, acct, - acct.AccountConfig(), acct.Worker(), template, h, original) + acct.AccountConfig(), acct.Worker(), template, h, &original) if err != nil { aerc.PushError("Error: " + err.Error()) return nil, err -- cgit