]> granicus.if.org Git - neomutt/commit
entire-thread: determine current position before resorting.
authorAndres Freund <andres@anarazel.de>
Tue, 21 May 2019 23:13:10 +0000 (16:13 -0700)
committerRichard Russon <rich@flatcap.org>
Tue, 21 May 2019 23:29:29 +0000 (00:29 +0100)
commit5dedc626ea3bf332dcbc001067ef3dac13c42a09
treec2a9ef20b22049087d81218c8f8ed47195c1a16f
parent5fb5bbf08b394e8a971d96f1b964a2327344381e
entire-thread: determine current position before resorting.

Previously oldcur was determined after nm_read_entire_thread(),
leading to entire-thread unintentionally jumping to the first message
in the thread.

Before 918885f32db41 that used to work, because mutt_sort_headers()
wasn't called from within nm_read_entire_thread().

Fix by moving determination of pre nm_read_entire_thread() count a few
lines up. Also reuse existing oldcount variable, rather than
'oc' (which could also be oldcur).

Fixes: #1714
index.c