]> granicus.if.org Git - neomutt/commitdiff
reset notmuch Mailbox->size on opening
authorJenya Sovetkin <e.sovetkin@gmail.com>
Fri, 7 Dec 2018 17:54:04 +0000 (18:54 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 8 Dec 2018 11:56:54 +0000 (11:56 +0000)
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.

notmuch/mutt_notmuch.c

index bd498c63cbd117e0bb8f9c9a37798ca32af24197..ab1c64f6cb24b96a7d0813f7f67d91aa723a1e98 100644 (file)
@@ -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);
   }