mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Word highlighting was buggy
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1286 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
95fb3f5623
commit
e2ff4550ea
@ -447,12 +447,17 @@ static void sig_print_text(TEXT_DEST_REC *dest, const char *str)
|
||||
/* end of the line */
|
||||
pos = strip_real_length(str, next_hilight_end,
|
||||
&color_pos, &color_len);
|
||||
if (color_pos > 0) {
|
||||
if (color_pos > 0)
|
||||
lastcolor = g_strndup(str+color_pos, color_len);
|
||||
g_string_append(tmp, lastcolor);
|
||||
g_string_append(tmp, str+pos);
|
||||
g_free(lastcolor);
|
||||
else {
|
||||
/* no colors in line, change back to default */
|
||||
lastcolor = g_malloc0(3);
|
||||
lastcolor[0] = 4;
|
||||
lastcolor[1] = FORMAT_STYLE_DEFAULTS;
|
||||
}
|
||||
g_string_append(tmp, lastcolor);
|
||||
g_string_append(tmp, str+pos);
|
||||
g_free(lastcolor);
|
||||
|
||||
newstr = tmp->str;
|
||||
g_string_free(tmp, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user