]> git.llucax.com Git - software/mutt-debian.git/blobdiff - debian/patches/upstream/228671-pipe-mime.patch
Add upstream/573823-imap_internal_date
[software/mutt-debian.git] / debian / patches / upstream / 228671-pipe-mime.patch
index ba49e2d8c394a4d9679d7b1141c50aea0d86f138..f17b147cfefb97041284bd86a6f6a03cc43f61eb 100644 (file)
@@ -2,17 +2,35 @@ Don't draw imap fetch progress if we aren't in visual mode.
 Drawing progress leaves terminal in confusing state when piping a message
 from pager to less(1). See http://bugs.mutt.org/1771
 
 Drawing progress leaves terminal in confusing state when piping a message
 from pager to less(1). See http://bugs.mutt.org/1771
 
+Updated in #569279.
+
 --- a/imap/message.c
 +++ b/imap/message.c
 --- a/imap/message.c
 +++ b/imap/message.c
-@@ -489,8 +489,9 @@
+@@ -392,7 +392,7 @@ int imap_fetch_message (MESSAGE *msg, CO
+   char path[_POSIX_PATH_MAX];
+   char *pc;
+   long bytes;
+-  progress_t progressbar;
++  progress_t progressbar, *pbar;
+   int uid;
+   int cacheno;
+   IMAP_CACHE *cache;
+@@ -489,9 +489,15 @@ int imap_fetch_message (MESSAGE *msg, CO
            imap_error ("imap_fetch_message()", buf);
            goto bail;
          }
 -        mutt_progress_init (&progressbar, _("Fetching message..."),
 -                            M_PROGRESS_SIZE, NetInc, bytes);
            imap_error ("imap_fetch_message()", buf);
            goto bail;
          }
 -        mutt_progress_init (&progressbar, _("Fetching message..."),
 -                            M_PROGRESS_SIZE, NetInc, bytes);
-+          if (!isendwin())
+-        if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
++        if (!isendwin())
++        {
 +          mutt_progress_init (&progressbar, _("Fetching message..."),
 +                            M_PROGRESS_SIZE, NetInc, bytes);
 +          mutt_progress_init (&progressbar, _("Fetching message..."),
 +                            M_PROGRESS_SIZE, NetInc, bytes);
-         if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
++          pbar = &progressbar;
++        }
++        else
++          pbar = NULL;
++        if (imap_read_literal (msg->fp, idata, bytes, pbar) < 0)
            goto bail;
          /* pick up trailing line */
            goto bail;
          /* pick up trailing line */
+         if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE)