]> granicus.if.org Git - neomutt/commitdiff
Avoid redundant sort in entire-thread.
authorAndres Freund <andres@anarazel.de>
Tue, 21 May 2019 23:50:54 +0000 (16:50 -0700)
committerAustin Ray <austin@austinray.io>
Wed, 22 May 2019 21:41:29 +0000 (17:41 -0400)
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

diff --git a/index.c b/index.c
index edb51e1a318e6d451c6c71cd2516164d37b00660..f55fc5d625ae6a56cb985ce7b85ecc778b6380d6 100644 (file)
--- 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;