diff options
author | Jeffas <dev@jeffas.io> | 2019-10-02 17:16:15 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-10-09 19:46:43 -0400 |
commit | d3379dd7f0d2e5caffeda4a97fc72649421cccca (patch) | |
tree | 4ee6a1bfb24636cc511eb6e528817eeb46faf258 /lib/msgstore.go | |
parent | 1339faf7881f33762c6e0a4915404e362fc51de1 (diff) | |
download | aerc-d3379dd7f0d2e5caffeda4a97fc72649421cccca.tar.gz |
Preserve sorting order in search results
This ensures that the search results follow the order of the current sort so that cycling throught the results proceeds in displayed order.
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r-- | lib/msgstore.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go index 8cceed8..68e20d5 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -4,6 +4,7 @@ import ( "io" "time" + "git.sr.ht/~sircmpwn/aerc/lib/sort" "git.sr.ht/~sircmpwn/aerc/models" "git.sr.ht/~sircmpwn/aerc/worker/types" ) @@ -386,6 +387,7 @@ func (store *MessageStore) Search(args []string, cb func([]uint32)) { }, func(msg types.WorkerMessage) { switch msg := msg.(type) { case *types.SearchResults: + sort.SortBy(msg.Uids, store.uids) cb(msg.Uids) } }) |