summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-12-01 18:34:40 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-12-01 18:34:40 +0100
commit0c48b7ab8bbd4b5b2f5bb73f3e96930091fa7ead (patch)
tree81c97eed28c050a64f8180be9e79a2becd63ecd5
parentd3799b4616d9c968c497fca34db4073c0fcef74e (diff)
downloadweechat-0c48b7ab8bbd4b5b2f5bb73f3e96930091fa7ead.zip
irc: use color code 0x1F (ctrl-_) for underlined text in input line (same code as messages) (bug #40756)
-rw-r--r--ChangeLog4
-rw-r--r--src/plugins/irc/irc-color.c10
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a760e1d0b..ab597d477 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,7 +44,9 @@ 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 color code 0x1F (`ctrl-_`) for underlined text in input line (same
+ code as messages) (bug #40756)
+* 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
diff --git a/src/plugins/irc/irc-color.c b/src/plugins/irc/irc-color.c
index 08b57f0f9..c19199f97 100644
--- a/src/plugins/irc/irc-color.c
+++ b/src/plugins/irc/irc-color.c
@@ -308,7 +308,7 @@ irc_color_decode_for_user_entry (const char *string)
ptr_string++;
break;
case IRC_COLOR_UNDERLINE_CHAR:
- out[out_pos++] = 0x15;
+ out[out_pos++] = 0x1F;
ptr_string++;
break;
case IRC_COLOR_COLOR_CHAR:
@@ -404,14 +404,14 @@ irc_color_encode (const char *string, int keep_colors)
out[out_pos++] = IRC_COLOR_RESET_CHAR;
ptr_string++;
break;
- case 0x15: /* ^U */
+ case 0x16: /* ^V */
if (keep_colors)
- out[out_pos++] = IRC_COLOR_UNDERLINE_CHAR;
+ out[out_pos++] = IRC_COLOR_REVERSE_CHAR;
ptr_string++;
break;
- case 0x16: /* ^V */
+ case 0x1F: /* ^_ */
if (keep_colors)
- out[out_pos++] = IRC_COLOR_REVERSE_CHAR;
+ out[out_pos++] = IRC_COLOR_UNDERLINE_CHAR;
ptr_string++;
break;
default: