aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msgviewer.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-03-15 20:38:37 +0100
committerRobin Jarry <robin@jarry.cc>2023-04-01 01:01:07 +0200
commit088d63ce934c34e113a5b3154dfcf91b49132067 (patch)
treea743b7f5f563d7382ebde83cac5ba498b3f6b1e7 /widgets/msgviewer.go
parentaec90650f63ff0195599dae817016db137964bcb (diff)
downloadaerc-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 'widgets/msgviewer.go')
-rw-r--r--widgets/msgviewer.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 0375dda9..f38b186a 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -390,11 +390,10 @@ func (mv *MessageViewer) Bindings() string {
}
}
-func (mv *MessageViewer) Close() error {
+func (mv *MessageViewer) Close() {
if mv.switcher != nil {
mv.switcher.Cleanup()
}
- return nil
}
func (ps *PartSwitcher) Invalidate() {
@@ -847,7 +846,7 @@ func (pv *PartViewer) Draw(ctx *ui.Context) {
func (pv *PartViewer) Cleanup() {
if pv.term != nil {
- pv.term.Close(nil)
+ pv.term.Close()
}
}