From 088d63ce934c34e113a5b3154dfcf91b49132067 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 15 Mar 2023 20:38:37 +0100 Subject: tabs: make sure to close tab content Rework how tabs are closed. Change the aerc.RemoveTab and aerc.ReplaceTab functions to accept a new boolean argument. If true, make sure to close the tab content. Signed-off-by: Robin Jarry --- commands/msg/reply.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'commands/msg/reply.go') diff --git a/commands/msg/reply.go b/commands/msg/reply.go index 4fb5860a..2b9f5d4f 100644 --- a/commands/msg/reply.go +++ b/commands/msg/reply.go @@ -181,9 +181,8 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error { aerc.PushError("Error: " + err.Error()) return err } - if (mv != nil) && closeOnReply { - mv.Close() - aerc.RemoveTab(mv) + if mv != nil && closeOnReply { + aerc.RemoveTab(mv, true) } if args[0] == "reply" { -- cgit