1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

core: fix buffer property "lines_hidden" when merging buffers or when a line is removed from a buffer (closes #226)

This commit is contained in:
Sébastien Helleu
2014-11-01 10:23:33 +01:00
parent 3d4c4aac9b
commit 24c4c04741
2 changed files with 10 additions and 3 deletions
+2
View File
@@ -39,6 +39,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
=== Bugs fixed
* core: fix buffer property "lines_hidden" when merging buffers or when a line
is removed from a buffer (closes #226)
* core: display time in bare display only if option
weechat.look.buffer_time_format is not an empty string
* core: fix translation of message displayed after /upgrade
+8 -3
View File
@@ -947,6 +947,10 @@ gui_line_add_to_list (struct t_gui_lines *lines,
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)
(lines->lines_hidden)++;
lines->lines_count++;
}
@@ -996,6 +1000,10 @@ gui_line_remove_from_list (struct t_gui_buffer *buffer,
gui_buffer_ask_chat_refresh (buffer, 1);
}
/* adjust "lines_hidden" if the line was hidden */
if (!line->data->displayed && (lines->lines_hidden > 0))
(lines->lines_hidden)--;
/* free data */
if (free_data)
{
@@ -1287,9 +1295,6 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
}
else
{
buffer->own_lines->lines_hidden++;
if (buffer->mixed_lines)
buffer->mixed_lines->lines_hidden++;
(void) hook_signal_send ("buffer_lines_hidden",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}