diff options
author | Robin Jarry <robin@jarry.cc> | 2023-03-15 20:38:37 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-04-01 01:01:07 +0200 |
commit | 088d63ce934c34e113a5b3154dfcf91b49132067 (patch) | |
tree | a743b7f5f563d7382ebde83cac5ba498b3f6b1e7 /commands/msgview | |
parent | aec90650f63ff0195599dae817016db137964bcb (diff) | |
download | aerc-088d63ce934c34e113a5b3154dfcf91b49132067.tar.gz |
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 <robin@jarry.cc>
Diffstat (limited to 'commands/msgview')
-rw-r--r-- | commands/msgview/close.go | 3 | ||||
-rw-r--r-- | commands/msgview/next.go | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/commands/msgview/close.go b/commands/msgview/close.go index 1fed0b7c..5e4f3e92 100644 --- a/commands/msgview/close.go +++ b/commands/msgview/close.go @@ -25,7 +25,6 @@ func (Close) Execute(aerc *widgets.Aerc, args []string) error { return errors.New("Usage: close") } mv, _ := aerc.SelectedTabContent().(*widgets.MessageViewer) - mv.Close() - aerc.RemoveTab(mv) + aerc.RemoveTab(mv, true) return nil } diff --git a/commands/msgview/next.go b/commands/msgview/next.go index d4c02123..cc7a5479 100644 --- a/commands/msgview/next.go +++ b/commands/msgview/next.go @@ -53,7 +53,7 @@ func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error { } nextMv := widgets.NewMessageViewer(acct, view) aerc.ReplaceTab(mv, nextMv, - nextMsg.Envelope.Subject) + nextMsg.Envelope.Subject, true) }) } if nextMsg := store.Selected(); nextMsg != nil { |