From: Jenya Sovetkin Date: Fri, 7 Dec 2018 17:54:04 +0000 (+0100) Subject: reset notmuch Mailbox->size on opening X-Git-Tag: 2019-10-25~458 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c19ee0ff1fc515172c2ce13972e2a12160c52af;p=neomutt reset notmuch Mailbox->size on opening previous behaviour: size was not reset. This resulted in mailbox size to accumulate on each mailbox reopening, hence displaying incorrect mailbox size information in the status bar. new behaviour: size is reset to zero. steps to replicate previous behaviour: open neomutt with vfolder. Press space to refresh vfolder (open from sidebar) several times. Mailbox size in the status bar accumulates. --- diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c index bd498c63c..ab1c64f6c 100644 --- a/notmuch/mutt_notmuch.c +++ b/notmuch/mutt_notmuch.c @@ -2136,6 +2136,7 @@ static int nm_mbox_open(struct Mailbox *m, struct Context *ctx) m->hdrmax = m->msg_count; m->msg_count = 0; m->vcount = 0; + m->size = 0; mx_alloc_memory(m); }