summaryrefslogtreecommitdiffstats
path: root/curs_main.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-03-03 19:58:41 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-03-03 19:58:41 +0000
commit275858eee6d57bafc48f56095c324efe56b59511 (patch)
treedb60c5442cbfa4cc5d75094376da8068ff21857e /curs_main.c
parente0ae569c01e6aa93463d18aa6531f507943d7614 (diff)
releasing 0.96.1.
Diffstat (limited to 'curs_main.c')
-rw-r--r--curs_main.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/curs_main.c b/curs_main.c
index e6721e90..2d0bd169 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -299,6 +299,13 @@ int mutt_index_menu (void)
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);
+
if (Context && !attach_msg)
{
int check;
@@ -949,11 +956,6 @@ int mutt_index_menu (void)
break;
}
- if (option (OPTNEEDRESORT) && Context && Context->msgcount)
- {
- resort_index (menu);
- }
-
menu->menu = MENU_PAGER;
menu->oldcurrent = menu->current;
continue;
@@ -1488,10 +1490,6 @@ int mutt_index_menu (void)
CurrentMenu = MENU_MAIN;
mutt_enter_command ();
mutt_check_rescore (Context);
- if (option (OPTNEEDRESORT) && Context && Context->msgcount)
- {
- resort_index (menu);
- }
if (option (OPTFORCEREDRAWINDEX))
menu->redraw = REDRAW_FULL;
unset_option (OPTFORCEREDRAWINDEX);