mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 09:02:13 +02:00
Minor cleanup in the highlighting signal.
This commit is contained in:
parent
618c8bd10e
commit
a39e210ea8
1 changed files with 5 additions and 10 deletions
|
|
@ -379,21 +379,16 @@ static void sig_print_text(TEXT_DEST_REC *dest, const char *text,
|
||||||
char *middle;
|
char *middle;
|
||||||
int pos, color_pos, color_len;
|
int pos, color_pos, color_len;
|
||||||
|
|
||||||
tmp = g_string_new(NULL);
|
|
||||||
|
|
||||||
/* start of the line */
|
/* start of the line */
|
||||||
pos = strip_real_length(text, hilight_start, NULL, NULL);
|
pos = strip_real_length(text, hilight_start, NULL, NULL);
|
||||||
g_string_append(tmp, text);
|
tmp = g_string_new_len(text, pos);
|
||||||
g_string_truncate(tmp, pos);
|
|
||||||
|
|
||||||
/* color */
|
/* color */
|
||||||
g_string_append(tmp, color);
|
g_string_append(tmp, color);
|
||||||
|
|
||||||
/* middle of the line, stripped */
|
/* middle of the line, stripped */
|
||||||
middle = strip_codes(text + pos);
|
middle = strip_codes(text + pos);
|
||||||
pos = tmp->len;
|
g_string_append_len(tmp, middle, hilight_len);
|
||||||
g_string_append(tmp, middle);
|
|
||||||
g_string_truncate(tmp, pos+hilight_len);
|
|
||||||
g_free(middle);
|
g_free(middle);
|
||||||
|
|
||||||
/* end of the line */
|
/* end of the line */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue