On Tue, Jul 24, 2018 at 04:47:43AM +0200, Vincent Lefevre wrote:
> On 2018-07-22 09:54:44 -0700, Kevin J. McCarthy wrote:
> > I think the second time is okay.  The routine is just resorting, and
> > updating the virtual and v2r fields with the assumption that the actual
> > visible headers hasn't changed.
> 
> mutt_sort_headers can be called in mbox_sync_mailbox after the
> mailbox has been reopened:
> 
>   if (need_sort)
>     /* if the mailbox was reopened, the thread tree will be invalid so make
>      * sure to start threading from scratch.  */
>     mutt_sort_headers (ctx, (need_sort == MUTT_REOPENED));

Unless I'm missing something, this looks redundant - for the case where
mbox_check_mailbox() returns new mail or reopen.

OP_MAIN_SYNC_FOLDER will end up calling update_index() for either of
those cases, which will both perform the sort and update vcount/vsize.

OP_QUIT and OP_MAIN_CHANGE_FOLDER do the same thing.

But I do notice OP_MAIN_IMAP_LOGOUT_ALL neglected to, and should be fixed.

> While testing, I've noticed an unrelated bug:
> 
> ---Mutt: =test2 [Msg:46/46 Inc:10 
> 202K/203K]---(date)---------------------(end)-
> 
> All messages are visible in the limited view, but vsize is different
> from the full size. This is not consistent. This happens when starting
> Mutt on this mailbox and selecting a limited view.

A quick test didn't show me the problem, so I'll have to play around
with this.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to