summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-08-28 18:32:50 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-08-28 18:32:50 +0200
commit54b7c8855369b755f59db3e80281d54f7c1b85c9 (patch)
treec9bb6920c4e0602d1ef22a678245e71c0f8ec2ed /src/plugins
parentaac14f28dd7cd7917f772380cd297e1a8bec62c6 (diff)
downloadweechat-54b7c8855369b755f59db3e80281d54f7c1b85c9.zip
spell: also skip IRC color attributes codes when checking words in input (issue #1547)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/spell/spell.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/spell/spell.c b/src/plugins/spell/spell.c
index 0cd546eca..62a88388c 100644
--- a/src/plugins/spell/spell.c
+++ b/src/plugins/spell/spell.c
@@ -658,6 +658,22 @@ spell_skip_color_codes (char **string, char **result)
weechat_string_dyn_concat (result, *string, color_code_size);
(*string) += color_code_size;
}
+ else if (*string[0] == '\x02' || *string[0] == '\x0F'
+ || *string[0] == '\x11' || *string[0] == '\x16'
+ || *string[0] == '\x1D' || *string[0] == '\x1F')
+ {
+ /*
+ * IRC attribute:
+ * 0x02: bold
+ * 0x0F: reset
+ * 0x11: monospaced font
+ * 0x16: reverse video
+ * 0x1D: italic
+ * 0x1F: underlined text
+ */
+ weechat_string_dyn_concat (result, *string, 1);
+ (*string)++;
+ }
else if (*string[0] == '\x03')
{
/* IRC color code */