From: Rocco Rutte Date: Wed, 2 Jul 2008 16:23:30 +0000 (+0200) Subject: Calculate menu->max after a possible resort in index X-Git-Tag: mutt-1-5-19-rel~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8aa8542798f92ee92cd225497111e742decddc93;p=mutt Calculate menu->max after a possible resort in index (maybe changing number of messages). Closes #3088. --- diff --git a/curs_main.c b/curs_main.c index 3bb60ed0..4f549995 100644 --- a/curs_main.c +++ b/curs_main.c @@ -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);