X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fsidebar.c;h=b59a874765eca3b389870faf142e33045f5a4a93;hp=180e0c31eac674bdd841964660eb4c42b429c579;hb=88d239144bf6f50ca1eda6db7742281f0ad0f97f;hpb=391e6a700bb5447ab9d628fa9b909b919e8228f2 diff --git a/lib-ui/sidebar.c b/lib-ui/sidebar.c index 180e0c3..b59a874 100644 --- a/lib-ui/sidebar.c +++ b/lib-ui/sidebar.c @@ -13,10 +13,9 @@ */ #include -#include - #include -#include + +#include #include "mutt.h" #include "charset.h" @@ -254,7 +253,6 @@ int sidebar_draw(void) { static short prev_show_value = -1; int x, y, line; - char blank[STRING]; WINDOW *sw; /* initialize first time */ @@ -270,11 +268,9 @@ int sidebar_draw(void) return 0; getmaxyx(sw, y, x); - memset(&blank, ' ', sizeof(blank)); - - wmove(sw, 0, 0); - SETCOLOR(sw, MT_COLOR_STATUS); - waddnstr(sw, blank, x); + SETCOLOR(sw, MT_COLOR_SIDEBAR); + mvwhline(sw, 0, 0, ACS_HLINE, x - 1); + mvwaddch(sw, 0, x - 1, ACS_TTEE); line = 1; for (int i = calc_boundaries(); i < Incoming.len && line < y - 1; i++) { @@ -298,15 +294,14 @@ int sidebar_draw(void) while (line < y - 1) { SETCOLOR(sw, MT_COLOR_NORMAL); - waddnstr(sw, blank, x - 1); + whline(sw, ' ', x - 1); SETCOLOR(sw, MT_COLOR_SIDEBAR); - waddch(sw, ACS_VLINE); - line++; + mvwaddch(sw, line++, x - 1, ACS_VLINE); } - SETCOLOR(sw, MT_COLOR_STATUS); - waddnstr(sw, blank, x); - SETCOLOR(sw, MT_COLOR_NORMAL); + SETCOLOR(sw, MT_COLOR_SIDEBAR); + mvwhline(sw, y - 1, 0, ACS_HLINE, x - 1); + mvwaddch(sw, y - 1, x - 1, ACS_BTEE); return 0; }