summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-02-05 11:11:20 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-02-05 11:11:20 +0100
commitf2be50f4b192bca95be061d9ac540f31758466b3 (patch)
tree810745bb22c362e21e8eac9e86a58155e1c42426 /src
parent9932f067107580621a7ec11eeb2b83c158660c33 (diff)
downloadweechat-f2be50f4b192bca95be061d9ac540f31758466b3.zip
Fix display of extended foreground color on non-default background in bars
Diffstat (limited to 'src')
-rw-r--r--src/gui/curses/gui-curses-bar-window.c2
-rw-r--r--src/gui/gui-bar-item.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c
index bf5f7c015..19e8c9223 100644
--- a/src/gui/curses/gui-curses-bar-window.c
+++ b/src/gui/curses/gui-curses-bar-window.c
@@ -291,7 +291,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
string += 3;
}
}
- if (str_fg[0] && (string[0] == ','))
+ if (string[0] == ',')
{
string++;
if (string[0] == GUI_COLOR_PAIR_CHAR)
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index ab1d3fb13..98534da0f 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -380,8 +380,9 @@ gui_bar_item_get_value (const char *name, struct t_gui_bar *bar,
if (CONFIG_COLOR(bar->options[GUI_BAR_OPTION_COLOR_DELIM]) & GUI_COLOR_PAIR_FLAG)
{
snprintf (delimiter_color, sizeof (delimiter_color),
- "%c%c%05d",
+ "%c%c%c%05d",
GUI_COLOR_COLOR_CHAR,
+ GUI_COLOR_FG_CHAR,
GUI_COLOR_PAIR_CHAR,
CONFIG_COLOR(bar->options[GUI_BAR_OPTION_COLOR_DELIM]) & GUI_COLOR_PAIR_MASK);
}
@@ -396,8 +397,9 @@ gui_bar_item_get_value (const char *name, struct t_gui_bar *bar,
if (CONFIG_COLOR(bar->options[GUI_BAR_OPTION_COLOR_FG]) & GUI_COLOR_PAIR_FLAG)
{
snprintf (bar_color, sizeof (bar_color),
- "%c%c%05d",
+ "%c%c%c%05d",
GUI_COLOR_COLOR_CHAR,
+ GUI_COLOR_FG_CHAR,
GUI_COLOR_PAIR_CHAR,
CONFIG_COLOR(bar->options[GUI_BAR_OPTION_COLOR_FG]) & GUI_COLOR_PAIR_MASK);
}