aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/move.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-07-31 09:41:20 -0500
committerRobin Jarry <robin@jarry.cc>2022-08-01 10:37:35 +0200
commit56dabb5c9cd769d0bbb3c37ba514da150eeb5943 (patch)
treea26fbf4aa3b9dcb64e0b45ef89e0e5320496f45a /commands/msg/move.go
parentdb195bebf061d793ff34ba209059fe3f43e189e2 (diff)
downloadaerc-56dabb5c9cd769d0bbb3c37ba514da150eeb5943.tar.gz
msgstore: leave visual-mark mode after certain commands
Commit "4753cfd visual-mode: deselect messages after performing command" introduced the behavior of leaving visual mark mode after performing certain commands. Add this behavior to additional commands: - Delete - Archive - Move Remark the selected mail files if an error occurred during the operation. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg/move.go')
-rw-r--r--commands/msg/move.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/msg/move.go b/commands/msg/move.go
index 098227e3..d88a36f1 100644
--- a/commands/msg/move.go
+++ b/commands/msg/move.go
@@ -62,6 +62,7 @@ func (Move) Execute(aerc *widgets.Aerc, args []string) error {
aerc.RemoveTab(h.msgProvider)
}
store.Next()
+ store.ClearVisualMark()
acct.Messages().Invalidate()
joinedArgs := strings.Join(args[optind:], " ")
store.Move(uids, joinedArgs, createParents, func(
@@ -71,6 +72,7 @@ func (Move) Execute(aerc *widgets.Aerc, args []string) error {
case *types.Done:
aerc.PushStatus("Message moved to "+joinedArgs, 10*time.Second)
case *types.Error:
+ store.Remark()
aerc.PushError(msg.Error.Error())
}
})