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:
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user