+void sidebar_draw_frames (void) {
+ size_t i,delim_len;
+
+ if (!option(OPTMBOXPANE) || SidebarWidth==0)
+ return;
+
+ delim_len=m_strlen(NONULL(SidebarDelim));
+
+ /* draw vertical delimiter */
+ SETCOLOR (MT_COLOR_SIDEBAR);
+ for (i = 0; i < LINES-1; i++) {
+ move (i, SidebarWidth - delim_len);
+ if (option (OPTASCIICHARS))
+ addstr (NONULL (SidebarDelim));
+ else if (!option (OPTASCIICHARS) && !m_strcmp(SidebarDelim, "|"))
+ addch (ACS_VLINE);
+ else if ((Charset_is_utf8) && !m_strcmp(SidebarDelim, "|"))
+ addstr ("\342\224\202");
+ else
+ addstr (NONULL (SidebarDelim));
+ }
+
+ /* fill "gaps" at top+bottom */
+ SETCOLOR(MT_COLOR_STATUS);
+ for (i=0; i<SidebarWidth; i++) {
+ /*
+ * if we don't have $status_on_top and have $help, fill top
+ * gap with spaces to get bg color
+ */
+ if (option(OPTSTATUSONTOP) || option(OPTHELP)) {
+ move(0,i);
+ addch(' ');
+ }
+ /*
+ * if we don't have $status_on_top or we have $help, fill bottom
+ * gap with spaces to get bg color
+ */
+ if (!option(OPTSTATUSONTOP) || option(OPTHELP)) {
+ move(LINES-2,i);
+ addch(' ');
+ }
+ }
+ SETCOLOR (MT_COLOR_NORMAL);
+}
+