diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-04-16 00:22:20 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-04-17 12:18:33 +0200 |
commit | cb887a2d9d7d7cd5eb57d8849df40cecc3b90090 (patch) | |
tree | b7b23c34a772048484ed6e645226ff64fe103d64 /commands/msg/toggle-threads.go | |
parent | a34be9eb36d26afdd723146673694db70662429c (diff) | |
download | aerc-cb887a2d9d7d7cd5eb57d8849df40cecc3b90090.tar.gz |
store: keep current message selected
Keep current message selected when clearing or changing filters and when
toggling threads.
Add -s flag to the clear command to also clear the selected message and
set cursor to the top of the message list.
Implements: https://todo.sr.ht/~rjarry/aerc/36
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg/toggle-threads.go')
-rw-r--r-- | commands/msg/toggle-threads.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/commands/msg/toggle-threads.go b/commands/msg/toggle-threads.go index 79d515cb..ac4242b8 100644 --- a/commands/msg/toggle-threads.go +++ b/commands/msg/toggle-threads.go @@ -34,6 +34,7 @@ func (ToggleThreads) Execute(aerc *widgets.Aerc, args []string) error { if err != nil { return err } + defer store.Reselect(store.Selected()) store.SetBuildThreads(!store.BuildThreads()) acct.SetStatus(statusline.Threading(store.BuildThreads())) acct.Messages().Invalidate() |