From 6104ba5c2f5245d282c126d5120878b25bf963b0 Mon Sep 17 00:00:00 2001 From: Alain Bench Date: Tue, 4 Oct 2005 04:29:09 +0000 Subject: [PATCH] Piping and printing in IMAP folder index with imap_peek=no marks message read immediatly. --- curs_main.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/curs_main.c b/curs_main.c index 24ef28cb..71cf6063 100644 --- a/curs_main.c +++ b/curs_main.c @@ -1996,27 +1996,49 @@ CHECK_IMAP_ACL(IMAP_ACL_INSERT); continue; } break; - + case OP_PIPE: CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; mutt_pipe_message (tag ? NULL : CURHDR); + +#ifdef USE_IMAP + /* in an IMAP folder index with imap_peek=no, piping could change + * new or old messages status to read. Redraw what's needed. + */ + if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) + { + menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; + } +#endif + MAYBE_REDRAW (menu->redraw); break; case OP_PRINT: CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; mutt_print_message (tag ? NULL : CURHDR); + +#ifdef USE_IMAP + /* in an IMAP folder index with imap_peek=no, printing could change + * new or old messages status to read. Redraw what's needed. + */ + if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) + { + menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; + } +#endif + break; case OP_MAIN_READ_THREAD: case OP_MAIN_READ_SUBTHREAD: CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; CHECK_READONLY; #ifdef USE_IMAP -- 2.40.0