From 034a458f92b2b4e3fd89318b5da672454ada7afa Mon Sep 17 00:00:00 2001 From: pdmef Date: Tue, 8 Mar 2005 21:10:51 +0000 Subject: [PATCH] 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 --- buffy.c | 2 +- sidebar.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.20.1