-
- /* draw the divider */
- SETCOLOR (MT_COLOR_SIDEBAR);
- for (lines = 1;
- lines < LINES - 1 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
- lines++) {
- move (lines, SidebarWidth - delim_len);
- if (option (OPTASCIICHARS))
- addstr (NONULL (SidebarDelim));
- else if (!option (OPTASCIICHARS) && !safe_strcmp (SidebarDelim, "|"))
- addch (ACS_VLINE);
- else if ((Charset_is_utf8) && !safe_strcmp (SidebarDelim, "|"))
- addstr ("\342\224\202");
- else
- addstr (NONULL (SidebarDelim));
+ /* draw devider only if necessary (if the sidebar becomes visible e.g.)*/
+ if (draw_devider == 1){
+ /* draw the divider */
+ SETCOLOR (MT_COLOR_SIDEBAR);
+ for (lines = 1;
+ lines < LINES - 1 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
+ lines++) {
+ move (lines, SidebarWidth - delim_len);
+ if (option (OPTASCIICHARS))
+ addstr (NONULL (SidebarDelim));
+ else if (!option (OPTASCIICHARS) && !safe_strcmp (SidebarDelim, "|"))
+ addch (ACS_VLINE);
+ else if ((Charset_is_utf8) && !safe_strcmp (SidebarDelim, "|"))
+ addstr ("\342\224\202");
+ else
+ addstr (NONULL (SidebarDelim));
+ }