diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-07 21:29:05 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-07 21:29:05 +0200 |
commit | 7aa82db47106206b8e1bc0c56d34530ec25d23e6 (patch) | |
tree | 95a789a3485b1c7587b9f00e2c983904a51dbb14 /src/gui/curses/gui-curses-window.c | |
parent | f065b43b71fe7b492607a66b2c13cf489af1b9b8 (diff) | |
download | weechat-7aa82db47106206b8e1bc0c56d34530ec25d23e6.zip |
core: replace char "," by "~" in color codes to separate foreground from background (closes #1264)
Diffstat (limited to 'src/gui/curses/gui-curses-window.c')
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index d0c5a77fe..10d1aac09 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -792,7 +792,12 @@ gui_window_string_apply_color_fg_bg (unsigned char **string, WINDOW *window) ptr_string += 2; } } - if (ptr_string[0] == ',') + /* + * note: the comma is an old separator not used any more + * (since WeeChat 2.6), but we still use it here so in case of /upgrade + * this will not break colors in old messages + */ + if ((ptr_string[0] == ',') || (ptr_string[0] == '~')) { ptr_string++; if (ptr_string[0] == GUI_COLOR_EXTENDED_CHAR) |