1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 20:06:38 +02:00

irc: don't strip monospace color code 0x11 from incoming messages (closes #2073)

This commit is contained in:
Sébastien Helleu
2024-02-16 19:22:28 +01:00
parent 8b6452eb91
commit 162bcb2622
4 changed files with 11 additions and 17 deletions
+1
View File
@@ -27,6 +27,7 @@ New features::
Bug fixes::
* core: remove trailing directory separators in home directories (issue #2070)
* irc: don't strip monospace color code 0x11 from incoming messages (issue #2073)
* irc: fix random date displayed when a received message contains tags but no "time" (issue #2064)
* scripts: fix crash on script unload when a hook is created in a buffer close callback (issue #2067)
* trigger: fix memory leak when adding a new trigger with `/trigger` command
-3
View File
@@ -258,9 +258,6 @@ irc_color_decode (const char *string, int keep_colors)
underline = 0;
ptr_string++;
break;
case IRC_COLOR_FIXED_CHAR:
ptr_string++;
break;
case IRC_COLOR_REVERSE_CHAR:
if (keep_colors)
{
-3
View File
@@ -50,9 +50,6 @@
#define IRC_COLOR_RESET_CHAR '\x0F' /* reset color/attributes */
#define IRC_COLOR_RESET_STR "\x0F" /* [0F]... */
#define IRC_COLOR_FIXED_CHAR '\x11' /* monospaced font (ignored) */
#define IRC_COLOR_FIXED_STR "\x11" /* [11]...[11] */
#define IRC_COLOR_REVERSE_CHAR '\x16' /* reverse video (fg <--> bg) */
#define IRC_COLOR_REVERSE_STR "\x16" /* [16]...[16] */
+10 -11
View File
@@ -41,8 +41,6 @@ extern int irc_color_convert_term2irc (int color);
"test_" IRC_COLOR_BOLD_STR "bold" IRC_COLOR_BOLD_STR "_end"
#define STRING_IRC_RESET \
"test_" IRC_COLOR_RESET_STR "reset" IRC_COLOR_RESET_STR "_end"
#define STRING_IRC_FIXED \
"test_" IRC_COLOR_FIXED_STR "fixed" IRC_COLOR_FIXED_STR "_end"
#define STRING_IRC_REVERSE \
"test_" IRC_COLOR_REVERSE_STR "reverse" IRC_COLOR_REVERSE_STR "_end"
#define STRING_IRC_ITALIC \
@@ -57,11 +55,16 @@ extern int irc_color_convert_term2irc (int color);
"test_" IRC_COLOR_COLOR_STR "11,05" "lightcyan/red" \
IRC_COLOR_COLOR_STR "_end"
#define STRING_IRC_ONLY_ATTRS_AND_COLORS \
IRC_COLOR_COLOR_STR IRC_COLOR_RESET_STR \
IRC_COLOR_BOLD_STR IRC_COLOR_FIXED_STR IRC_COLOR_REVERSE_STR \
IRC_COLOR_ITALIC_STR IRC_COLOR_UNDERLINE_STR \
IRC_COLOR_UNDERLINE_STR IRC_COLOR_ITALIC_STR \
IRC_COLOR_REVERSE_STR IRC_COLOR_FIXED_STR IRC_COLOR_BOLD_STR
IRC_COLOR_COLOR_STR \
IRC_COLOR_RESET_STR \
IRC_COLOR_BOLD_STR \
IRC_COLOR_REVERSE_STR \
IRC_COLOR_ITALIC_STR \
IRC_COLOR_UNDERLINE_STR \
IRC_COLOR_UNDERLINE_STR \
IRC_COLOR_ITALIC_STR \
IRC_COLOR_REVERSE_STR \
IRC_COLOR_BOLD_STR
#define STRING_IRC_ATTRS_AND_COLORS \
"test_" \
IRC_COLOR_BOLD_STR IRC_COLOR_UNDERLINE_STR \
@@ -237,10 +240,6 @@ TEST(IrcColor, Decode)
gui_color_get_custom ("reset"));
WEE_CHECK_DECODE(string, STRING_IRC_RESET, 1);
/* fixed */
WEE_CHECK_DECODE("test_fixed_end", STRING_IRC_FIXED, 0);
WEE_CHECK_DECODE("test_fixed_end", STRING_IRC_FIXED, 1);
/* reverse */
WEE_CHECK_DECODE("test_reverse_end", STRING_IRC_REVERSE, 0);
snprintf (string, sizeof (string),