From ba2162090499da23179cb420dc2bf570b1308876 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 31 Aug 1998 13:41:19 +0000 Subject: [PATCH] Updating to patch-0.94.4.vikas.attach_message.3. --- compose.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/compose.c b/compose.c index f2049f75..2ab36b74 100644 --- a/compose.c +++ b/compose.c @@ -651,6 +651,16 @@ int mutt_send_menu (HEADER *msg, /* structure for new message */ this = Context; /* remember current folder */ Context = ctx; close = mutt_index_menu (1); + if (!Context) + { + /* go back to the folder we started from */ + Context = this; + /* Restore old $sort and $sort_aux */ + Sort = oldSort; + SortAux = oldSortAux; + menu->redraw |= REDRAW_INDEX | REDRAW_STATUS; + break; + } } { int numtag = 0; @@ -681,9 +691,9 @@ int mutt_send_menu (HEADER *msg, /* structure for new message */ else { HEADER *h; - for (i = 0; i < Context->vcount; i++) + for (i = 0; i < Context->msgcount; i++) { - h = Context->hdrs[Context->v2r[i]]; + h = Context->hdrs[i]; if (h->tagged) { idx[idxlen] = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR)); -- 2.40.0