]> granicus.if.org Git - neomutt/commitdiff
fix sidebar/mail_check painting problem
authorRichard Russon <rich@flatcap.org>
Thu, 23 Jun 2016 14:57:32 +0000 (15:57 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 23 Jun 2016 14:57:34 +0000 (15:57 +0100)
The bug was triggered when $mail_check was set to 0.

When drawing the status line, the Sidebar lied about its size to
workaround a bug in mutt_FormatString().  Whilst in that function the
Sidebar was redrawn.

The Sidebar got confused over whether it should be visible or not and
promptly vanished.

buffy.c

diff --git a/buffy.c b/buffy.c
index dfec46f7d3fdd8abad4ab919a4ec21d9c2c459a6..e4ab05088d08899d265a3a616a12a158040cbddb 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -475,7 +475,8 @@ buffy_maildir_update (BUFFY *mailbox)
        mailbox->sb_last_checked = time (NULL);
 
        /* make sure the updates are actually put on screen */
-       mutt_sb_draw();
+       if (SidebarWidth)
+               mutt_sb_draw();
 }
 
 #endif
@@ -546,7 +547,8 @@ buffy_mbox_update (BUFFY *mailbox, struct stat *sb)
   }
 
   /* make sure the updates are actually put on screen */
-  mutt_sb_draw();
+  if (SidebarWidth)
+    mutt_sb_draw();
 }
 #endif