mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: fix color when the delimiter is not followed by a background color (closes #1867)
This commit is contained in:
@@ -40,6 +40,7 @@ New features::
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix color when the delimiter is not followed by a background color (issue #1867)
|
||||
* core: display chars the same way in chat and bars, replace tabulations by spaces in bars, display chars < 32 with letter in chat, do not display soft hyphens, zero width spaces and all non-printable chars (issue #1659, issue #1669, issue #1770)
|
||||
* core: fix context info in buffers with free content (issue #1832)
|
||||
* core: keep terminal title unchanged when option weechat.look.window_title is set to empty value (issue #1835, issue #1836)
|
||||
|
||||
+1
-1
@@ -424,7 +424,7 @@ gui_color_get_custom (const char *color_name)
|
||||
else
|
||||
str_fg = string_strndup (ptr_color_name,
|
||||
pos_delim - ptr_color_name);
|
||||
pos_bg = pos_delim + 1;
|
||||
pos_bg = (pos_delim[1]) ? pos_delim + 1 : NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -192,6 +192,10 @@ TEST(GuiColor, GetCustom)
|
||||
GUI_COLOR_BAR_BG_CHAR);
|
||||
STRCMP_EQUAL(string, gui_color_get_custom ("bar_bg"));
|
||||
|
||||
/* only delimiter (no-op) */
|
||||
STRCMP_EQUAL("", gui_color_get_custom (","));
|
||||
STRCMP_EQUAL("", gui_color_get_custom (":"));
|
||||
|
||||
/* fg color */
|
||||
snprintf (string, sizeof (string),
|
||||
"%c%c09",
|
||||
@@ -199,6 +203,14 @@ TEST(GuiColor, GetCustom)
|
||||
GUI_COLOR_FG_CHAR);
|
||||
STRCMP_EQUAL(string, gui_color_get_custom ("blue"));
|
||||
|
||||
/* fg color, delimiter and no bg color */
|
||||
snprintf (string, sizeof (string),
|
||||
"%c%c09",
|
||||
GUI_COLOR_COLOR_CHAR,
|
||||
GUI_COLOR_FG_CHAR);
|
||||
STRCMP_EQUAL(string, gui_color_get_custom ("blue,"));
|
||||
STRCMP_EQUAL(string, gui_color_get_custom ("blue:"));
|
||||
|
||||
/* bg color */
|
||||
snprintf (string, sizeof (string),
|
||||
"%c%c09",
|
||||
|
||||
Reference in New Issue
Block a user