X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=sidebar.c;h=7d5ab232d43348f3b2928c24f29a7e239fa48204;hb=901c0e4683d5bd43139062255bf19d90914fbf3b;hp=4a648aa072f23ac9f43b49c259fd13689fb0d95c;hpb=079e3129829f02ec9fa6e31c45d1b57deb63f663;p=apps%2Fmadmutt.git diff --git a/sidebar.c b/sidebar.c index 4a648aa..7d5ab23 100644 --- a/sidebar.c +++ b/sidebar.c @@ -227,6 +227,12 @@ 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); @@ -256,7 +262,14 @@ int draw_sidebar(int menu) { for (lines = 1; lines < LINES-1-(menu != MENU_PAGER || option (OPTSTATUSONTOP)); lines++ ) { move(lines, SidebarWidth - delim_len); - addstr (NONULL (SidebarDelim)); + if (option (OPTASCIICHARS)) + addstr (NONULL (SidebarDelim)); + else if(!option(OPTASCIICHARS) && !strcmp(SidebarDelim,"|")) + addch(ACS_VLINE); + else if ((Charset_is_utf8) && !strcmp(SidebarDelim, "|")) + addstr ("\342\224\202"); + else + addstr (NONULL (SidebarDelim)); } SETCOLOR(MT_COLOR_NORMAL);