changeset: 6668:91608dca6f12
user: Kevin McCarthy <[email protected]>
date: Sun Jun 05 18:05:41 2016 -0700
link: http://dev.mutt.org/hg/mutt/rev/91608dca6f12
Fix sidebar buffy stats updating on mailbox close.
Move the mutt_sb_set_buffystats() call from mx_fastclose_mailbox() to
the bottom of mx_close_mailbox(). Append-only mailboxes don't have
msgcount set, so fastclose was the wrong place to be doing these
updates.
diffs (26 lines):
diff -r 8e342d73159b -r 91608dca6f12 mx.c
--- a/mx.c Sat Jun 04 11:32:12 2016 -0700
+++ b/mx.c Sun Jun 05 18:05:41 2016 -0700
@@ -743,10 +743,6 @@
mutt_clear_threads (ctx);
for (i = 0; i < ctx->msgcount; i++)
mutt_free_header (&ctx->hdrs[i]);
-#ifdef USE_SIDEBAR
- ctx->msgcount -= ctx->deleted;
- mutt_sb_set_buffystats (ctx);
-#endif
FREE (&ctx->hdrs);
FREE (&ctx->v2r);
FREE (&ctx->path);
@@ -1015,6 +1011,11 @@
!mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))
mx_unlink_empty (ctx->path);
+#ifdef USE_SIDEBAR
+ ctx->msgcount -= ctx->deleted;
+ mutt_sb_set_buffystats (ctx);
+#endif
+
mx_fastclose_mailbox (ctx);
return 0;