From 3c7fd0aca3aa56a97151a270e220d039215a22fa Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Tue, 21 May 2019 16:50:54 -0700 Subject: [PATCH] Avoid redundant sort in entire-thread. 918885f added, indirectly, a mutt_sort_headers() call to nm_read_entire_thread() (via mutt_mailbox_changed() -> ctx_mailbox_changed() -> ctx_update()), but didn't remove the sort after nm_read_entire_thread() in mutt_index_menu(). Remove the now superfluous sort. --- index.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.c b/index.c index edb51e1a3..f55fc5d62 100644 --- a/index.c +++ b/index.c @@ -1992,8 +1992,7 @@ int mutt_index_menu(void) } if (oldcount < Context->mailbox->msg_count) { - if ((C_Sort & SORT_MASK) == SORT_THREADS) - mutt_sort_headers(Context, false); + /* nm_read_entire_thread() triggers mutt_sort_headers() if necessary */ menu->current = oldcur->virtual; menu->redraw = REDRAW_STATUS | REDRAW_INDEX; -- 2.40.0