From 2eb24a06eeccbcb8eed35d58bf5686a1a3dfb34e Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Wed, 4 Apr 2007 11:47:28 -0700 Subject: [PATCH] Only reset UIDNEXT if new mail has been detected. This prevents mutt from suddenly finding new mail when switching from unknown UIDVALIDITY to known. --- imap/command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/imap/command.c b/imap/command.c index 83ef3fa57..329155208 100644 --- a/imap/command.c +++ b/imap/command.c @@ -909,8 +909,10 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s) else inc->new = status->unseen; - /* forced back to keep detecting new mail until the mailbox is opened */ - status->uidnext = oldun; + if (inc->new) + /* force back to keep detecting new mail until the mailbox is + opened */ + status->uidnext = oldun; FREE (&value); return; -- 2.50.1