From 4753cfd3e33f985ec22c5600a8d7e68b72175607 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 10 Jun 2022 17:24:12 -0500 Subject: visual-mode: deselect messages after performing command In order to better align to vim functionality: deselect visual mode selections after performing a command on the selection. This patch also introduces a new command to allow for re-selecting (remarking) the previous selection set so that commands can be chained together. The deselection only applies to msg commands that *do not* move the message from the store (those types of commands already deselect): - read/unread - flag/unflag - modify-labels - copy - pipe Previous usage to mark several messages as read and deselect all: Vjjj:read:unmark -a New usage, similar to vim: Vjjj:read To chain a command together: Vjjj:read:remark{next command} Signed-off-by: Tim Culverhouse Acked-by: Robin Jarry --- commands/msg/modify-labels.go | 1 + 1 file changed, 1 insertion(+) (limited to 'commands/msg/modify-labels.go') diff --git a/commands/msg/modify-labels.go b/commands/msg/modify-labels.go index ca3ccf7..a3b4900 100644 --- a/commands/msg/modify-labels.go +++ b/commands/msg/modify-labels.go @@ -57,6 +57,7 @@ func (ModifyLabels) Execute(aerc *widgets.Aerc, args []string) error { switch msg := msg.(type) { case *types.Done: aerc.PushStatus("labels updated", 10*time.Second) + store.ClearVisualMark() case *types.Error: aerc.PushError(msg.Error.Error()) } -- cgit v1.2.3