[mutt] 15/17: 228671-pipe-mime

Antonio Radici antonio at moszumanska.debian.org
Sun Aug 28 15:32:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

antonio pushed a commit to branch patch-queue/master
in repository mutt.

commit 0f74dbd8402b425c25e91d223fc43737e4c44e66
Author: Antonio Radici <antonio at debian.org>
Date:   Thu Feb 27 17:11:56 2014 +0100

    228671-pipe-mime
    
    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
    
    Updated in Debian bug #569279
    
    Gbp-Pq: Topic upstream
    Gbp-Pq: Name 228671-pipe-mime.patch
---
 imap/message.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/imap/message.c b/imap/message.c
index 8211d3a..c4f80b3 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -401,7 +401,7 @@ int imap_fetch_message (CONTEXT *ctx, MESSAGE *msg, int msgno)
   char path[_POSIX_PATH_MAX];
   char *pc;
   long bytes;
-  progress_t progressbar;
+  progress_t progressbar, *pbar;
   int uid;
   int cacheno;
   IMAP_CACHE *cache;
@@ -499,8 +499,14 @@ int imap_fetch_message (CONTEXT *ctx, MESSAGE *msg, int msgno)
 	    imap_error ("imap_fetch_message()", buf);
 	    goto bail;
 	  }
-	  mutt_progress_init (&progressbar, _("Fetching message..."),
-			      MUTT_PROGRESS_SIZE, NetInc, bytes);
+	  if (!isendwin())
+	  {
+	    mutt_progress_init (&progressbar, _("Fetching message..."),
+                            M_PROGRESS_SIZE, NetInc, bytes);
+	    pbar = &progressbar;
+	  }
+	  else
+	    pbar = NULL;
 	  if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
 	    goto bail;
 	  /* pick up trailing line */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list