~ubuntu-branches/ubuntu/maverick/mutt/maverick

« back to all changes in this revision

Viewing changes to debian/patches/upstream/228671-pipe-mime.patch

  • Committer: Package Import Robot
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2010-06-22 17:48:54 UTC
  • mfrom: (2.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20100622174854-grpayfk2rgoyl2qk
Tags: 1.5.20-9ubuntu1
* Merge with Debian (LP: #588736). Remaining changes:
  + debian/control, debian/patches/debian-specific/build_doc_adjustments.diff:
    Use w3m (main) instead of elinks (universe) for generating documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Drawing progress leaves terminal in confusing state when piping a message
3
3
from pager to less(1). See http://bugs.mutt.org/1771
4
4
 
 
5
Updated in #569279.
 
6
 
5
7
--- a/imap/message.c
6
8
+++ b/imap/message.c
7
 
@@ -489,8 +489,9 @@
 
9
@@ -392,7 +392,7 @@ int imap_fetch_message (MESSAGE *msg, CO
 
10
   char path[_POSIX_PATH_MAX];
 
11
   char *pc;
 
12
   long bytes;
 
13
-  progress_t progressbar;
 
14
+  progress_t progressbar, *pbar;
 
15
   int uid;
 
16
   int cacheno;
 
17
   IMAP_CACHE *cache;
 
18
@@ -489,9 +489,15 @@ int imap_fetch_message (MESSAGE *msg, CO
8
19
            imap_error ("imap_fetch_message()", buf);
9
20
            goto bail;
10
21
          }
11
22
-         mutt_progress_init (&progressbar, _("Fetching message..."),
12
23
-                             M_PROGRESS_SIZE, NetInc, bytes);
13
 
+          if (!isendwin())
 
24
-         if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
 
25
+         if (!isendwin())
 
26
+         {
14
27
+           mutt_progress_init (&progressbar, _("Fetching message..."),
15
28
+                             M_PROGRESS_SIZE, NetInc, bytes);
16
 
          if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
 
29
+           pbar = &progressbar;
 
30
+         }
 
31
+         else
 
32
+           pbar = NULL;
 
33
+         if (imap_read_literal (msg->fp, idata, bytes, pbar) < 0)
17
34
            goto bail;
18
35
          /* pick up trailing line */
 
36
          if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE)