aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/delete.go6
-rw-r--r--commands/msg/move.go8
-rw-r--r--commands/msg/reply.go5
3 files changed, 8 insertions, 11 deletions
diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index 9a07e509..6d3fb4a3 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -56,11 +56,11 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
mv, isMsgView := h.msgProvider.(*widgets.MessageViewer)
if isMsgView {
if !config.Ui.NextMessageOnDelete {
- aerc.RemoveTab(h.msgProvider)
+ aerc.RemoveTab(h.msgProvider, true)
} else {
// no more messages in the list
if next == nil {
- aerc.RemoveTab(h.msgProvider)
+ aerc.RemoveTab(h.msgProvider, true)
acct.Messages().Select(-1)
ui.Invalidate()
return
@@ -73,7 +73,7 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
return
}
nextMv := widgets.NewMessageViewer(acct, view)
- aerc.ReplaceTab(mv, nextMv, next.Envelope.Subject)
+ aerc.ReplaceTab(mv, nextMv, next.Envelope.Subject, true)
})
}
} else {
diff --git a/commands/msg/move.go b/commands/msg/move.go
index fc35c41b..e8661a61 100644
--- a/commands/msg/move.go
+++ b/commands/msg/move.go
@@ -93,12 +93,10 @@ func handleDone(
mv, isMsgView := h.msgProvider.(*widgets.MessageViewer)
switch {
case isMsgView && !config.Ui.NextMessageOnDelete:
- mv.Close()
- aerc.RemoveTab(h.msgProvider)
+ aerc.RemoveTab(h.msgProvider, true)
case isMsgView:
- mv.Close()
if next == nil {
- aerc.RemoveTab(h.msgProvider)
+ aerc.RemoveTab(h.msgProvider, true)
acct.Messages().Select(-1)
ui.Invalidate()
return
@@ -111,7 +109,7 @@ func handleDone(
return
}
nextMv := widgets.NewMessageViewer(acct, view)
- aerc.ReplaceTab(mv, nextMv, next.Envelope.Subject)
+ aerc.ReplaceTab(mv, nextMv, next.Envelope.Subject, true)
})
default:
if next == nil {
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" {