1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: fix refresh of bar item "scroll" in root bar after /buffer clear (closes #590)

This commit is contained in:
Sébastien Helleu
2024-06-10 14:29:29 +02:00
parent 7395387ebe
commit 023a3b90fa
4 changed files with 24 additions and 0 deletions
+1
View File
@@ -25,6 +25,7 @@
- irc: clear /list buffer when disconnecting from server ([#2133](https://github.com/weechat/weechat/issues/2133))
- irc: display an explicit message on /list buffer when the list of channels is empty ([#2133](https://github.com/weechat/weechat/issues/2133))
- xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade ([#2092](https://github.com/weechat/weechat/issues/2092))
- core: fix refresh of bar item "scroll" in root bar after `/buffer clear` ([#590](https://github.com/weechat/weechat/issues/590))
- php: fix return value of function hdata_longlong
- tcl: fix return value of function hdata_longlong ([#2119](https://github.com/weechat/weechat/issues/2119))
- relay: fix websocket permessage-deflate extension when the client doesn't send the max window bits parameters ([#1549](https://github.com/weechat/weechat/issues/1549))
+19
View File
@@ -1288,6 +1288,7 @@ gui_line_remove_from_list (struct t_gui_buffer *buffer,
ptr_scroll->lines_after = 0;
gui_window_ask_refresh (1);
}
ptr_win->scroll_changed = 1;
}
if (ptr_scroll->text_search_start_line == line)
@@ -1441,10 +1442,28 @@ gui_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line)
void
gui_line_free_all (struct t_gui_buffer *buffer)
{
struct t_gui_window *ptr_win;
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
{
ptr_win->scroll_changed = 0;
}
while (buffer->own_lines->first_line)
{
gui_line_free (buffer, buffer->own_lines->first_line);
}
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
{
if (ptr_win->scroll_changed)
{
ptr_win->scroll_changed = 0;
(void) hook_signal_send ("window_scrolled",
WEECHAT_HOOK_SIGNAL_POINTER,
ptr_win);
}
}
}
/*
+3
View File
@@ -716,6 +716,7 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer,
/* scroll */
gui_window_scroll_init (new_window->scroll, buffer);
new_window->scroll_changed = 0;
/* coordinates */
new_window->coords_size = 0;
@@ -1964,6 +1965,7 @@ gui_window_hdata_window_cb (const void *pointer, void *data,
HDATA_VAR(struct t_gui_window, layout_plugin_name, STRING, 0, NULL, NULL);
HDATA_VAR(struct t_gui_window, layout_buffer_name, STRING, 0, NULL, NULL);
HDATA_VAR(struct t_gui_window, scroll, POINTER, 0, NULL, "window_scroll");
HDATA_VAR(struct t_gui_window, scroll_changed, INTEGER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_window, ptr_tree, POINTER, 0, NULL, "window_tree");
HDATA_VAR(struct t_gui_window, prev_window, POINTER, 0, NULL, hdata_name);
HDATA_VAR(struct t_gui_window, next_window, POINTER, 0, NULL, hdata_name);
@@ -2134,6 +2136,7 @@ gui_window_print_log ()
log_printf (" layout_plugin_name. : '%s'", ptr_window->layout_plugin_name);
log_printf (" layout_buffer_name. : '%s'", ptr_window->layout_buffer_name);
log_printf (" scroll. . . . . . . : %p", ptr_window->scroll);
log_printf (" scroll_changed. . . : %d", ptr_window->scroll_changed);
log_printf (" coords_size . . . . : %d", ptr_window->coords_size);
log_printf (" coords. . . . . . . : %p", ptr_window->coords);
log_printf (" ptr_tree. . . . . . : %p", ptr_window->ptr_tree);
+1
View File
@@ -72,6 +72,7 @@ struct t_gui_window
/* scroll */
struct t_gui_window_scroll *scroll; /* scroll infos for each buffer */
/* scrolled in this window */
int scroll_changed; /* scrolled changed? */
/* coordinates (for focus) */
int coords_size; /* size of coords (number of lines) */