From: pdmef Date: Tue, 8 Mar 2005 21:10:51 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=034a458f92b2b4e3fd89318b5da672454ada7afa;hp=6d49ab835cd93fd30ac0c4f7ca11216ac3f685cd Rocco Rutte: fix infinite loop after sidebar visibility toggle (oops!) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@156 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/buffy.c b/buffy.c index 37f479d..d3a6663 100644 --- a/buffy.c +++ b/buffy.c @@ -587,7 +587,7 @@ int mutt_buffy_check (int force) BuffyNotify++; tmp->has_new = tmp->new > 0; } - if (BuffyCount > 0) + if (BuffyCount > 0 && SidebarWidth > 0) draw_sidebar (CurrentMenu); return (BuffyCount); } diff --git a/sidebar.c b/sidebar.c index 937dd20..615ee10 100644 --- a/sidebar.c +++ b/sidebar.c @@ -241,9 +241,10 @@ int draw_sidebar(int menu) { saveSidebarWidth = SidebarWidth; SidebarWidth = 0; } else if(!prev_show_value && option(OPTMBOXPANE)) { - SidebarWidth = saveSidebarWidth; + SidebarWidth = 0; /* after toggle: force recounting of all mail */ mutt_buffy_check(1); + SidebarWidth = saveSidebarWidth; } prev_show_value = option(OPTMBOXPANE); }