summaryrefslogtreecommitdiff
path: root/src/gui/gui-line.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-10-29 07:17:30 +0100
committerSébastien Helleu <flashcode@flashtux.org>2017-10-29 07:17:30 +0100
commit84013b82df558bd844c41a5dc7fb345cbfad98d8 (patch)
tree8fbaa4141010a168ce5b801ce1e5e6b6c854cf59 /src/gui/gui-line.c
parent6b817015e30278faec4ede3c17fff4b981d06e40 (diff)
downloadweechat-84013b82df558bd844c41a5dc7fb345cbfad98d8.zip
core: do not change the chat prefix size when a filtered line is added (closes #1092)
Diffstat (limited to 'src/gui/gui-line.c')
-rw-r--r--src/gui/gui-line.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c
index c34a7a970..6e671ef61 100644
--- a/src/gui/gui-line.c
+++ b/src/gui/gui-line.c
@@ -945,13 +945,19 @@ gui_line_add_to_list (struct t_gui_lines *lines,
line->next_line = NULL;
lines->last_line = line;
- /* adjust "prefix_max_length" if this prefix length is > max */
- gui_line_get_prefix_for_display (line, NULL, &prefix_length, NULL,
- &prefix_is_nick);
- if (prefix_is_nick)
- prefix_length += config_length_nick_prefix_suffix;
- if (prefix_length > lines->prefix_max_length)
- lines->prefix_max_length = prefix_length;
+ /*
+ * adjust "prefix_max_length" if this prefix length is > max
+ * (only if the line is displayed
+ */
+ if (line->data->displayed)
+ {
+ gui_line_get_prefix_for_display (line, NULL, &prefix_length, NULL,
+ &prefix_is_nick);
+ if (prefix_is_nick)
+ prefix_length += config_length_nick_prefix_suffix;
+ if (prefix_length > lines->prefix_max_length)
+ lines->prefix_max_length = prefix_length;
+ }
/* adjust "lines_hidden" if the line is hidden */
if (!line->data->displayed)