From: Kevin McCarthy Date: Tue, 14 Jun 2016 20:11:56 +0000 (-0700) Subject: Reset buffy->new for the current mailbox in IMAP. X-Git-Tag: neomutt-20160709~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7ff43aa9c62208ad3dfed5710d750e03df25535;p=neomutt Reset buffy->new for the current mailbox in IMAP. 1f840760e6e0 moved the buffy->new reset inside the STATUS processor. Since the current mailbox is not STATUS'ed, it needs to be reset in imap_buffy_check(). Thanks to Aaron Schrab for reporting this issue (and for helping test tip). --- diff --git a/imap/imap.c b/imap/imap.c index 1b63b3a31..2b1fc6d97 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1504,14 +1504,20 @@ int imap_buffy_check (int force) mailbox->new = 0; if (imap_get_mailbox (mailbox->path, &idata, name, sizeof (name)) < 0) + { + mailbox->new = 0; continue; + } /* Don't issue STATUS on the selected mailbox, it will be NOOPed or * IDLEd elsewhere. * idata->mailbox may be NULL for connections other than the current * mailbox's, and shouldn't expand to INBOX in that case. #3216. */ if (idata->mailbox && !imap_mxcmp (name, idata->mailbox)) + { + mailbox->new = 0; continue; + } if (!mutt_bit_isset (idata->capabilities, IMAP4REV1) && !mutt_bit_isset (idata->capabilities, STATUS))