]> granicus.if.org Git - mutt/commitdiff
Updating to patch-0.94.4.vikas.attach_message.3.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 31 Aug 1998 13:41:19 +0000 (13:41 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 31 Aug 1998 13:41:19 +0000 (13:41 +0000)
compose.c

index f2049f7580fd998169b0d91c1e44834ff2352b5e..2ab36b74285fb27f7d6e667862116b5994a9daa4 100644 (file)
--- 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));