Re: [Mutt] #3002: mutt-1.5.17: 'N'ew flag keeps being set on mails
#3002: mutt-1.5.17: 'N'ew flag keeps being set on mails in IMAP folders
Changes (by pw):
* owner: mutt-dev => brendan
* component: mutt => IMAP
Comment:
I've been frustrated by this too. It is repeatable. Get a few new
messages at the bottom of the folder (at least 3). Delete the last
one, reading it or not. Mark the previous ones as read, either by
reading or explicitly turning off the New flag. Quit. Upon rereading
the folder, you'll see that the first non-deleted mail has been marked
seen, but the others are still marked New.
The problem is in imap_make_msg_set, so I'm changing the component
of this ticket to IMAP. It is called by sync_helper in imap_sync_mailbox
to update the five flags of each message that may have changed. The
code at the end of imap_make_msg_set sets "setstart" to the first message
that has been read, but then defers extending the buffer with each
subsequent message, hoping to make a range. Eventually it finds the
last message, which has been deleted, remember, but fails to terminate
the range with ":%u" of the previous messages, because this last deleted
message is not ->active.
I'm a bit wary about making a patch as I'm not sure why this test on
active is in there. Changing line 946 in imap/imap.c 1.5.17 to read:
{{{
/* this message is not expunged and doesn't match ... */
else if (setstart)
{
}}}
does fix it for me.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3002#comment:1>