From: pdmef Date: Thu, 17 Mar 2005 17:58:36 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=939231b97323754e1329160d25212083242f7e09 Rocco Rutte: fix sidebar toggling (reported by Andreas Kneib) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@192 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/sidebar.c b/sidebar.c index 7d5ab23..c59e982 100644 --- a/sidebar.c +++ b/sidebar.c @@ -227,12 +227,6 @@ int draw_sidebar(int menu) { BUFFY *tmp; short delim_len = mutt_strlen (SidebarDelim); - if(strlen(SidebarDelim)>=SidebarWidth){ - mutt_endwin(NULL); - printf("Your sidebar delimiter string is longer (or as long as) than the sidebar width. Make it shorter! \n"); - exit(1); - } - /* initialize first time */ if(!initialized) { prev_show_value = option(OPTMBOXPANE); @@ -254,7 +248,15 @@ int draw_sidebar(int menu) { prev_show_value = option(OPTMBOXPANE); } - if ( SidebarWidth == 0 ) return 0; + if (SidebarWidth > 0 && option (OPTMBOXPANE) && mutt_strlen (SidebarDelim) >= SidebarWidth) { + mutt_error (_("Value for sidebar_delim is too long. Disabling sidebar.")); + sleep (2); + unset_option (OPTMBOXPANE); + return (0); + } + + if (SidebarWidth == 0 || !option (OPTMBOXPANE)) + return 0; /* draw the divider */ /* SETCOLOR(MT_COLOR_STATUS); */