]> granicus.if.org Git - mutt/commitdiff
Calculate menu->max after a possible resort in index
authorRocco Rutte <pdmef@gmx.net>
Wed, 2 Jul 2008 16:23:30 +0000 (18:23 +0200)
committerRocco Rutte <pdmef@gmx.net>
Wed, 2 Jul 2008 16:23:30 +0000 (18:23 +0200)
(maybe changing number of messages). Closes #3088.

curs_main.c

index 3bb60ed08b4293aef6c2a80bbbe148bc527bd83c..4f549995e942664bc23bf352a8808f657edca054 100644 (file)
@@ -451,16 +451,16 @@ int mutt_index_menu (void)
   {
     tag = 0; /* clear the tag-prefix */
 
-    menu->max = Context ? Context->vcount : 0;
-    oldcount = Context ? Context->msgcount : 0;
-
     /* check if we need to resort the index because just about
      * any 'op' below could do mutt_enter_command(), either here or
      * from any new menu launched, and change $sort/$sort_aux
      */
     if (option (OPTNEEDRESORT) && Context && Context->msgcount)
       resort_index (menu);
-    
+
+    menu->max = Context ? Context->vcount : 0;
+    oldcount = Context ? Context->msgcount : 0;
+
     if (option (OPTREDRAWTREE) && Context && Context->msgcount && (Sort & SORT_MASK) == SORT_THREADS)
     {
       mutt_draw_tree (Context);