From: Thomas Roessler Date: Mon, 31 Aug 1998 13:41:19 +0000 (+0000) Subject: Updating to patch-0.94.4.vikas.attach_message.3. X-Git-Tag: mutt-0-94-5i-rel~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba2162090499da23179cb420dc2bf570b1308876;p=mutt Updating to patch-0.94.4.vikas.attach_message.3. --- 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));