1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 15:26:37 +02:00

irc: use color code 0x16 (ctrl-V) for reverse video in messages

Other clients are using 0x16, and not 0x12 that was the default in
WeeChat (which was able to decode both 0x12 and 0x16).

Now the 0x12 is not decoded and does not make reverse video any more.
This commit is contained in:
Sebastien Helleu
2013-12-01 11:28:32 +01:00
parent b32ccca390
commit d03eb52d49
3 changed files with 9 additions and 12 deletions
+1
View File
@@ -42,6 +42,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* aspell: fix detection of nicks with non-alphanumeric chars
* guile: disable guile gmp allocator (fix crash on unload of relay plugin)
(bug #40628)
* irc: use color code 0x16 (ctrl-V) for reverse video in messages
* irc: use option irc.network.colors_send instead of irc.network.colors_receive
when displaying messages sent by commands /away, /me, /msg, /notice, /query
* irc: fix memory leak when checking the value of ssl_priorities option in
+6 -8
View File
@@ -121,7 +121,6 @@ irc_color_decode (const char *string, int keep_colors)
ptr_string++;
break;
case IRC_COLOR_REVERSE_CHAR:
case IRC_COLOR_REVERSE2_CHAR:
if (keep_colors)
{
snprintf (str_to_add, sizeof (str_to_add), "%s",
@@ -301,8 +300,7 @@ irc_color_decode_for_user_entry (const char *string)
ptr_string++;
break;
case IRC_COLOR_REVERSE_CHAR:
case IRC_COLOR_REVERSE2_CHAR:
out[out_pos++] = 0x12;
out[out_pos++] = 0x16;
ptr_string++;
break;
case IRC_COLOR_ITALIC_CHAR:
@@ -406,16 +404,16 @@ irc_color_encode (const char *string, int keep_colors)
out[out_pos++] = IRC_COLOR_RESET_CHAR;
ptr_string++;
break;
case 0x12: /* ^R */
if (keep_colors)
out[out_pos++] = IRC_COLOR_REVERSE_CHAR;
ptr_string++;
break;
case 0x15: /* ^U */
if (keep_colors)
out[out_pos++] = IRC_COLOR_UNDERLINE_CHAR;
ptr_string++;
break;
case 0x16: /* ^V */
if (keep_colors)
out[out_pos++] = IRC_COLOR_REVERSE_CHAR;
ptr_string++;
break;
default:
length = weechat_utf8_char_size ((char *)ptr_string);
if (length == 0)
+2 -4
View File
@@ -46,10 +46,8 @@
#define IRC_COLOR_RESET_STR "\x0F"
#define IRC_COLOR_FIXED_CHAR '\x11'
#define IRC_COLOR_FIXED_STR "\x11"
#define IRC_COLOR_REVERSE_CHAR '\x12'
#define IRC_COLOR_REVERSE_STR "\x12"
#define IRC_COLOR_REVERSE2_CHAR '\x16'
#define IRC_COLOR_REVERSE2_STR "\x16"
#define IRC_COLOR_REVERSE_CHAR '\x16'
#define IRC_COLOR_REVERSE_STR "\x16"
#define IRC_COLOR_ITALIC_CHAR '\x1D'
#define IRC_COLOR_ITALIC_STR "\x1D"
#define IRC_COLOR_UNDERLINE_CHAR '\x1F'