commit - 318400264718f49d7b20ea385927a7ef1216bb78
commit + cb6c7aa0f2181e8fe3b60efd66c440288967c642
blob - 1c4e87da96fbee35ff347ba33fe0c0f290d1dbb8
blob + 2625844595554b41afae0707bdeb684270465a40
--- ui.c
+++ ui.c
[LINE_PRE_START] = { 0 },
[LINE_PRE_CONTENT] = { 0 },
[LINE_PRE_END] = { 0 },
+};
+
+static struct tab_face {
+ int background, tab, current_tab;
+} tab_face = {
+ A_REVERSE, A_REVERSE, A_NORMAL
};
static void
toskip--;
werase(tabline);
- wattron(tabline, A_REVERSE);
+ wattron(tabline, tab_face.background);
wprintw(tabline, toskip == 0 ? " " : "<");
+ wattroff(tabline, tab_face.background);
truncated = 0;
TAILQ_FOREACH(tab, &tabshead, tabs) {
}
if (current)
- wattroff(tabline, A_REVERSE);
+ wattron(tabline, tab_face.current_tab);
+ else
+ wattron(tabline, tab_face.tab);
wprintw(tabline, "%s", buf);
-
- if (current)
- wattron(tabline, A_REVERSE);
-
if (TAILQ_NEXT(tab, tabs) != NULL)
wprintw(tabline, " ");
+
+ if (current)
+ wattroff(tabline, tab_face.current_tab);
+ else
+ wattroff(tabline, tab_face.tab);
}
+ wattron(tabline, tab_face.background);
for (; x < COLS; ++x)
waddch(tabline, ' ');
if (truncated)