diff options
author | Oscar Morante | 2015-06-11 14:34:58 +0300 |
---|---|---|
committer | Oscar Morante | 2015-06-11 14:35:29 +0300 |
commit | e6384b51f68c57d993111a2a0faf8a2bdd69bb32 (patch) | |
tree | 30ecb81ba7e885e11deb6ba536bf6893bacc0c5f /228671-pipe-mime.patch | |
download | aur-e6384b51f68c57d993111a2a0faf8a2bdd69bb32.tar.gz |
initial import
Diffstat (limited to '228671-pipe-mime.patch')
-rw-r--r-- | 228671-pipe-mime.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/228671-pipe-mime.patch b/228671-pipe-mime.patch new file mode 100644 index 000000000000..04debc45232d --- /dev/null +++ b/228671-pipe-mime.patch @@ -0,0 +1,48 @@ +From: Antonio Radici <antonio@debian.org> +Date: Thu, 27 Feb 2014 17:11:56 +0100 +Subject: 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 +--- + imap/message.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/imap/message.c b/imap/message.c +index 3c9822f..3504be8 100644 +--- a/imap/message.c ++++ b/imap/message.c +@@ -398,7 +398,7 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, 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; +@@ -495,9 +495,15 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno) + imap_error ("imap_fetch_message()", buf); + goto bail; + } +- mutt_progress_init (&progressbar, _("Fetching message..."), +- M_PROGRESS_SIZE, NetInc, bytes); +- if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0) ++ 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, pbar) < 0) + goto bail; + /* pick up trailing line */ + if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE) |