summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-11-19 19:58:10 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-11-19 19:58:10 +0100
commit6716985d278f60fc36dbbdcc3e7ae88c34bc34c4 (patch)
tree53598cf7e028514a4eed144a2069fa70fabd8cc7
parentb5db21d6c4d98d9552456d084ff666e9147b9c96 (diff)
downloadweechat-6716985d278f60fc36dbbdcc3e7ae88c34bc34c4.zip
core: fix current color/background after reset of color
Bug was visible with such colored string in IRC: ^Cc7,5 one ^Cc ^Cc7 two Before the fix, the word "two" had a red background. The "^Cc" should reset both color + background, so now it does not have a background any more.
-rw-r--r--src/gui/curses/gui-curses-window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index 2d13cf712..b1bbf0f0b 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -307,6 +307,9 @@ gui_window_reset_style (WINDOW *window, int weechat_color)
void
gui_window_reset_color (WINDOW *window, int weechat_color)
{
+ gui_window_current_style_fg = gui_color[weechat_color]->foreground;
+ gui_window_current_style_bg = gui_color[weechat_color]->background;
+
wattron (window, COLOR_PAIR(gui_color_weechat_get_pair (weechat_color)) |
gui_color[weechat_color]->attributes);
}