X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/c4de82e1f73a93e2929f7c092aca1efbfc424090..d3fc6a7510a8ece5fe23e56e6180b18aa9128d36:/debian/patches/upstream/228671-pipe-mime.patch diff --git a/debian/patches/upstream/228671-pipe-mime.patch b/debian/patches/upstream/228671-pipe-mime.patch index ba49e2d..830219f 100644 --- a/debian/patches/upstream/228671-pipe-mime.patch +++ b/debian/patches/upstream/228671-pipe-mime.patch @@ -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 +Updated in #569279. + --- a/imap/message.c +++ b/imap/message.c -@@ -489,8 +489,9 @@ +@@ -398,7 +398,7 @@ + char path[_POSIX_PATH_MAX]; + char *pc; + long bytes; +- progress_t progressbar; ++ progress_t progressbar, *pbar; + int uid; + int cacheno; + IMAP_CACHE *cache; +@@ -495,9 +495,15 @@ 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); - 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 */ + if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE)