diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-08-08 22:21:44 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-22 09:30:37 +0200 |
commit | b12dd9f9263f7c2cf2f91bc3f6f5549ee0165cb1 (patch) | |
tree | 4282bcf41ee7ecbaa96aaa4c03a438e5f00e97da /commands/msg | |
parent | 16dbb9422120a2f229524f1cbee55f09e455b1d7 (diff) | |
download | aerc-b12dd9f9263f7c2cf2f91bc3f6f5549ee0165cb1.tar.gz |
mark: allow multiple visual selections
When entering visual selection mode, the current selection is deleted.
This patch extends the visual mode behavior to select multiple blocks of
messages.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/mark.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/commands/msg/mark.go b/commands/msg/mark.go index 13d6c928..939d456a 100644 --- a/commands/msg/mark.go +++ b/commands/msg/mark.go @@ -32,19 +32,23 @@ func (Mark) Execute(aerc *widgets.Aerc, args []string) error { return err } marker := store.Marker() - opts, _, err := getopt.Getopts(args, "atv") + opts, _, err := getopt.Getopts(args, "atvV") if err != nil { return err } var all bool var toggle bool var visual bool + var clearVisual bool for _, opt := range opts { switch opt.Option { case 'a': all = true case 'v': visual = true + clearVisual = true + case 'V': + visual = true case 't': toggle = true } @@ -70,7 +74,7 @@ func (Mark) Execute(aerc *widgets.Aerc, args []string) error { } return nil case visual: - marker.ToggleVisualMark() + marker.ToggleVisualMark(clearVisual) return nil default: modFunc(selected.Uid) |