From: Andres Freund Date: Tue, 21 May 2019 23:50:54 +0000 (-0700) Subject: Avoid redundant sort in entire-thread. X-Git-Tag: 2019-10-25~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c7fd0aca3aa56a97151a270e220d039215a22fa;p=neomutt 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. --- 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;