summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--doc/en/weechat_plugin_api.en.adoc1
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc1
-rw-r--r--doc/it/weechat_plugin_api.it.adoc2
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc2
-rw-r--r--doc/sr/weechat_plugin_api.sr.adoc2
-rw-r--r--src/core/wee-command.c12
-rw-r--r--src/gui/curses/gui-curses-window.c5
-rw-r--r--src/gui/gui-buffer.c135
-rw-r--r--src/gui/gui-buffer.h4
-rw-r--r--src/gui/gui-filter.c5
-rw-r--r--src/gui/gui-line.c19
-rw-r--r--tests/scripts/python/testapi.py4
13 files changed, 128 insertions, 65 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index b4ed649df..a51adad97 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele
New features::
+ * core: add variable "opening" in buffer, do not send buffer signals when the buffer is opening
* core: store microseconds in buffer lines (issue #649)
* core: evaluate expressions even when the suffix is missing ("}" by default) (issue #2042, issue #1714)
* core: add syntax highlighting in evaluation of expressions with `raw_hl:string` and `hl:string`, add option weechat.color.eval_syntax_colors (issue #2042)
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 70f1dd3eb..e98ae96c9 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -14315,6 +14315,7 @@ Arguments:
* _buffer_: buffer pointer
* _property_: property name:
+** _opening_: 1 if buffer is opening, otherwise 0 _(WeeChat ≥ 4.2.0)_
** _number_: number of buffer (starts to 1)
** _layout_number_: number of buffer saved in layout
** _layout_number_merge_order_: order in merge for layout
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index 191459d81..8a0c4fe18 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -14631,6 +14631,7 @@ Paramètres :
* _buffer_ : pointeur vers le tampon
* _property_ : nom de la propriété :
+** _opening_ : 1 si le tampon est en cours d'ouverture, sinon 0 _(WeeChat ≥ 4.2.0)_
** _number_ : numéro du tampon (commence à 1)
** _layout_number_ : numéro du tampon sauvegardé dans le "layout"
** _layout_number_merge_order_ : ordre du tampon mélangé pour le "layout"
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 48d738838..8004d0621 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -14969,6 +14969,8 @@ Argomenti:
* _buffer_: puntatore al buffer
* _property_: nome della proprietà:
+// TRANSLATION MISSING
+** _opening_: 1 if buffer is opening, otherwise 0 _(WeeChat ≥ 4.2.0)_
** _number_: numero del buffer (inizia da 1)
** _layout_number_: numero del buffer salvato nel layout
** _layout_number_merge_order_: ordine di unione per i layout
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index d88783bec..38481d17f 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -14507,6 +14507,8 @@ int weechat_buffer_get_integer (struct t_gui_buffer *buffer,
* _buffer_: バッファへのポインタ
* _property_: プロパティ名:
+// TRANSLATION MISSING
+** _opening_: 1 if buffer is opening, otherwise 0 _(WeeChat ≥ 4.2.0)_
** _number_: バッファの番号 (1 以上)
** _layout_number_: レイアウトに保存されたバッファの番号
** _layout_number_merge_order_: レイアウトのマージをする際の順番
diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc
index 30b8ed48b..b24ade3bf 100644
--- a/doc/sr/weechat_plugin_api.sr.adoc
+++ b/doc/sr/weechat_plugin_api.sr.adoc
@@ -13863,6 +13863,8 @@ int weechat_buffer_get_integer (struct t_gui_buffer *buffer,
* _buffer_: показивач на бафер
* _property_: име особине:
+// TRANSLATION MISSING
+** _opening_: 1 if buffer is opening, otherwise 0 _(WeeChat ≥ 4.2.0)_
** _number_: број бафера (почиње се од 1)
** _layout_number_: број бафера сачуван у распореду
** _layout_number_merge_order_: редослед у спајању за распоред
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 63f5ba68a..87d219249 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -2537,7 +2537,8 @@ COMMAND_CALLBACK(filter)
{
buffer->filter = 1;
gui_filter_buffer (buffer, NULL);
- (void) hook_signal_send (
+ (void) gui_buffer_send_signal (
+ buffer,
"buffer_filters_enabled",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
@@ -2589,7 +2590,8 @@ COMMAND_CALLBACK(filter)
{
buffer->filter = 0;
gui_filter_buffer (buffer, NULL);
- (void) hook_signal_send (
+ (void) gui_buffer_send_signal (
+ buffer,
"buffer_filters_disabled",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
@@ -2639,7 +2641,8 @@ COMMAND_CALLBACK(filter)
/* toggle filters in buffer */
buffer->filter ^= 1;
gui_filter_buffer (buffer, NULL);
- (void) hook_signal_send (
+ (void) gui_buffer_send_signal (
+ buffer,
(buffer->filter) ?
"buffer_filters_enabled" : "buffer_filters_disabled",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
@@ -7097,8 +7100,7 @@ COMMAND_CALLBACK(upgrade)
&& (string_strcmp (argv[index_args], "-save") == 0))
{
/* send "upgrade" signal to plugins */
- (void) hook_signal_send ("upgrade", WEECHAT_HOOK_SIGNAL_STRING,
- "save");
+ (void) hook_signal_send ("upgrade", WEECHAT_HOOK_SIGNAL_STRING, "save");
/* save WeeChat session */
if (!upgrade_weechat_save ())
{
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index 2b39622eb..6935fddb6 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -1372,8 +1372,9 @@ gui_window_switch_to_buffer (struct t_gui_window *window,
if (old_buffer != buffer)
{
- (void) hook_signal_send ("buffer_switch",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_switch",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
}
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 1c4f00aa3..ae17e4fdc 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -90,12 +90,12 @@ char *gui_buffer_notify_string[GUI_BUFFER_NUM_NOTIFY] =
{ "none", "highlight", "message", "all" };
char *gui_buffer_properties_get_integer[] =
-{ "number", "layout_number", "layout_number_merge_order", "type", "notify",
- "num_displayed", "active", "hidden", "zoomed", "print_hooks_enabled",
- "day_change", "clear", "filter", "closing", "lines_hidden",
- "prefix_max_length", "next_line_id", "time_for_each_line", "nicklist",
- "nicklist_case_sensitive", "nicklist_max_length", "nicklist_display_groups",
- "nicklist_count", "nicklist_visible_count",
+{ "opening", "number", "layout_number", "layout_number_merge_order", "type",
+ "notify", "num_displayed", "active", "hidden", "zoomed",
+ "print_hooks_enabled", "day_change", "clear", "filter", "closing",
+ "lines_hidden", "prefix_max_length", "next_line_id", "time_for_each_line",
+ "nicklist", "nicklist_case_sensitive", "nicklist_max_length",
+ "nicklist_display_groups", "nicklist_count", "nicklist_visible_count",
"nicklist_groups_count", "nicklist_groups_visible_count",
"nicklist_nicks_count", "nicklist_nicks_visible_count",
"input", "input_get_unknown_commands",
@@ -178,6 +178,19 @@ gui_buffer_search_notify (const char *notify)
}
/*
+ * Sends a buffer signal (only if the buffer is completely opened.
+ */
+
+int
+gui_buffer_send_signal (struct t_gui_buffer *buffer,
+ const char *signal,
+ const char *type_data, void *signal_data)
+{
+ return (buffer->opening) ?
+ WEECHAT_RC_OK : hook_signal_send (signal, type_data, signal_data);
+}
+
+/*
* Gets plugin name of buffer.
*
* Note: during upgrade process (at startup after /upgrade), the name of plugin
@@ -251,9 +264,10 @@ gui_buffer_local_var_add (struct t_gui_buffer *buffer, const char *name,
ptr_value = hashtable_get (buffer->local_variables, name);
hashtable_set (buffer->local_variables, name, value);
- (void) hook_signal_send ((ptr_value) ?
- "buffer_localvar_changed" : "buffer_localvar_added",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (
+ buffer,
+ (ptr_value) ? "buffer_localvar_changed" : "buffer_localvar_added",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -272,8 +286,9 @@ gui_buffer_local_var_remove (struct t_gui_buffer *buffer, const char *name)
if (ptr_value)
{
hashtable_remove (buffer->local_variables, name);
- (void) hook_signal_send ("buffer_localvar_removed",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_localvar_removed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
}
@@ -287,8 +302,9 @@ gui_buffer_local_var_remove_all (struct t_gui_buffer *buffer)
if (buffer && buffer->local_variables)
{
hashtable_remove_all (buffer->local_variables);
- (void) hook_signal_send ("buffer_localvar_removed",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_localvar_removed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
}
@@ -781,6 +797,7 @@ gui_buffer_new_props (struct t_weechat_plugin *plugin,
return NULL;
/* init buffer */
+ new_buffer->opening = 1;
new_buffer->plugin = plugin;
new_buffer->plugin_name_for_upgrade = NULL;
@@ -937,14 +954,18 @@ gui_buffer_new_props (struct t_weechat_plugin *plugin,
/* apply properties (from options weechat.buffer.*) */
gui_buffer_apply_config_properties (new_buffer);
+ new_buffer->opening = 0;
+
if (first_buffer_creation)
{
gui_buffer_visited_add (new_buffer);
}
else
{
- (void) hook_signal_send ("buffer_opened",
- WEECHAT_HOOK_SIGNAL_POINTER, new_buffer);
+ (void) gui_buffer_send_signal (
+ new_buffer,
+ "buffer_opened",
+ WEECHAT_HOOK_SIGNAL_POINTER, new_buffer);
}
return new_buffer;
@@ -1316,7 +1337,9 @@ gui_buffer_get_integer (struct t_gui_buffer *buffer, const char *property)
if (!buffer || !property)
return 0;
- if (strcmp (property, "number") == 0)
+ if (strcmp (property, "opening") == 0)
+ return buffer->opening;
+ else if (strcmp (property, "number") == 0)
return buffer->number;
else if (strcmp (property, "layout_number") == 0)
return buffer->layout_number;
@@ -1531,8 +1554,9 @@ gui_buffer_set_name (struct t_gui_buffer *buffer, const char *name)
gui_buffer_local_var_add (buffer, "name", name);
- (void) hook_signal_send ("buffer_renamed",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_renamed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
if (buffer->old_full_name)
{
@@ -1571,8 +1595,9 @@ gui_buffer_set_short_name (struct t_gui_buffer *buffer, const char *short_name)
buffer->mixed_lines->buffer_max_length_refresh = 1;
gui_buffer_ask_chat_refresh (buffer, 1);
- (void) hook_signal_send ("buffer_renamed",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_renamed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -1608,8 +1633,9 @@ gui_buffer_set_type (struct t_gui_buffer *buffer, enum t_gui_buffer_type type)
gui_buffer_ask_chat_refresh (buffer, 2);
- (void) hook_signal_send ("buffer_type_changed",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_type_changed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -1634,8 +1660,9 @@ gui_buffer_set_title (struct t_gui_buffer *buffer, const char *new_title)
free (buffer->title);
buffer->title = (new_title && new_title[0]) ? strdup (new_title) : NULL;
- (void) hook_signal_send ("buffer_title_changed",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_title_changed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -3078,8 +3105,9 @@ gui_buffer_clear (struct t_gui_buffer *buffer)
gui_buffer_ask_chat_refresh (buffer, 2);
- (void) hook_signal_send ("buffer_cleared",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_cleared",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -3775,9 +3803,10 @@ gui_buffer_zoom (struct t_gui_buffer *buffer)
gui_buffer_ask_chat_refresh (buffer, 2);
- (void) hook_signal_send ((buffer_was_zoomed) ?
- "buffer_unzoomed" : "buffer_zoomed",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (
+ buffer,
+ (buffer_was_zoomed) ? "buffer_unzoomed" : "buffer_zoomed",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -3879,9 +3908,10 @@ gui_buffer_renumber (int number1, int number2, int start_number)
}
if (ptr_buffer_moved)
{
- (void) hook_signal_send ("buffer_moved",
- WEECHAT_HOOK_SIGNAL_POINTER,
- ptr_buffer_moved);
+ (void) gui_buffer_send_signal (ptr_buffer_moved,
+ "buffer_moved",
+ WEECHAT_HOOK_SIGNAL_POINTER,
+ ptr_buffer_moved);
}
ptr_buffer = ptr_buffer2;
if (ptr_buffer == ptr_last_buffer)
@@ -4015,8 +4045,9 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
last_gui_buffer = ptr_last_buffer;
}
- (void) hook_signal_send ("buffer_moved",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_moved",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -4107,10 +4138,14 @@ gui_buffer_swap (int number1, int number2)
}
/* send signals */
- (void) hook_signal_send ("buffer_moved",
- WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[0]);
- (void) hook_signal_send ("buffer_moved",
- WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[1]);
+ (void) gui_buffer_send_signal (
+ ptr_first_buffer[0],
+ "buffer_moved",
+ WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[0]);
+ (void) gui_buffer_send_signal (
+ ptr_first_buffer[1],
+ "buffer_moved",
+ WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[1]);
}
/*
@@ -4214,8 +4249,9 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
gui_window_ask_refresh (1);
- (void) hook_signal_send ("buffer_merged",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_merged",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -4348,8 +4384,9 @@ gui_buffer_unmerge (struct t_gui_buffer *buffer, int number)
gui_window_ask_refresh (1);
- (void) hook_signal_send ("buffer_unmerged",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_unmerged",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -4392,8 +4429,9 @@ gui_buffer_hide (struct t_gui_buffer *buffer)
buffer->hidden = 1;
- (void) hook_signal_send ("buffer_hidden",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_hidden",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -4424,8 +4462,9 @@ gui_buffer_unhide (struct t_gui_buffer *buffer)
buffer->hidden = 0;
- (void) hook_signal_send ("buffer_unhidden",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_unhidden",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*
@@ -4924,6 +4963,7 @@ gui_buffer_hdata_buffer_cb (const void *pointer, void *data,
0, 0, NULL, NULL);
if (hdata)
{
+ HDATA_VAR(struct t_gui_buffer, opening, INTEGER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_buffer, plugin, POINTER, 0, NULL, "plugin");
HDATA_VAR(struct t_gui_buffer, plugin_name_for_upgrade, STRING, 0, NULL, NULL);
HDATA_VAR(struct t_gui_buffer, number, INTEGER, 0, NULL, NULL);
@@ -5109,6 +5149,8 @@ gui_buffer_add_to_infolist (struct t_infolist *infolist,
if (!infolist_new_var_integer (ptr_item, "current_buffer",
(gui_current_window->buffer == buffer) ? 1 : 0))
return 0;
+ if (!infolist_new_var_integer (ptr_item, "opening", buffer->opening))
+ return 0;
if (!infolist_new_var_pointer (ptr_item, "plugin", buffer->plugin))
return 0;
if (!infolist_new_var_string (ptr_item, "plugin_name",
@@ -5366,6 +5408,7 @@ gui_buffer_print_log ()
{
log_printf ("");
log_printf ("[buffer (addr:0x%lx)]", ptr_buffer);
+ log_printf (" opening . . . . . . . . : %d", ptr_buffer->opening);
log_printf (" plugin. . . . . . . . . : 0x%lx ('%s')",
ptr_buffer->plugin, gui_buffer_get_plugin_name (ptr_buffer));
log_printf (" plugin_name_for_upgrade : '%s'", ptr_buffer->plugin_name_for_upgrade);
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h
index ce406660c..c97947e72 100644
--- a/src/gui/gui-buffer.h
+++ b/src/gui/gui-buffer.h
@@ -98,6 +98,7 @@ struct t_gui_input_undo
struct t_gui_buffer
{
+ int opening; /* 1 if buffer is being opened */
struct t_weechat_plugin *plugin; /* plugin which created this buffer */
/* (NULL for a WeeChat buffer) */
/*
@@ -287,6 +288,9 @@ extern char *gui_buffer_properties_set[];
extern int gui_buffer_search_type (const char *type);
extern int gui_buffer_search_notify (const char *notify);
+extern int gui_buffer_send_signal (struct t_gui_buffer *buffer,
+ const char *signal,
+ const char *type_data, void *signal_data);
extern const char *gui_buffer_get_plugin_name (struct t_gui_buffer *buffer);
extern const char *gui_buffer_get_short_name (struct t_gui_buffer *buffer);
extern void gui_buffer_build_full_name (struct t_gui_buffer *buffer);
diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c
index 3ff9a871d..6b822af25 100644
--- a/src/gui/gui-filter.c
+++ b/src/gui/gui-filter.c
@@ -155,8 +155,9 @@ gui_filter_buffer (struct t_gui_buffer *buffer,
if (buffer->lines->lines_hidden != lines_hidden)
{
buffer->lines->lines_hidden = lines_hidden;
- (void) hook_signal_send ("buffer_lines_hidden",
- WEECHAT_HOOK_SIGNAL_POINTER, buffer);
+ (void) gui_buffer_send_signal (buffer,
+ "buffer_lines_hidden",
+ WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
if (lines_changed)
diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c
index 74020070d..597d7bbe4 100644
--- a/src/gui/gui-line.c
+++ b/src/gui/gui-line.c
@@ -1878,9 +1878,10 @@ gui_line_add (struct t_gui_line *line)
}
else
{
- (void) hook_signal_send ("buffer_lines_hidden",
- WEECHAT_HOOK_SIGNAL_POINTER,
- line->data->buffer);
+ (void) gui_buffer_send_signal (line->data->buffer,
+ "buffer_lines_hidden",
+ WEECHAT_HOOK_SIGNAL_POINTER,
+ line->data->buffer);
}
/* add mixed line, if buffer is attached to at least one other buffer */
@@ -1907,8 +1908,9 @@ gui_line_add (struct t_gui_line *line)
}
}
- (void) hook_signal_send ("buffer_line_added",
- WEECHAT_HOOK_SIGNAL_POINTER, line);
+ (void) gui_buffer_send_signal (line->data->buffer,
+ "buffer_line_added",
+ WEECHAT_HOOK_SIGNAL_POINTER, line);
}
/*
@@ -1987,9 +1989,10 @@ gui_line_add_y (struct t_gui_line *line)
if (old_line_displayed && !ptr_line->data->displayed)
{
(ptr_line->data->buffer->own_lines->lines_hidden)++;
- (void) hook_signal_send ("buffer_lines_hidden",
- WEECHAT_HOOK_SIGNAL_POINTER,
- ptr_line->data->buffer);
+ (void) gui_buffer_send_signal (ptr_line->data->buffer,
+ "buffer_lines_hidden",
+ WEECHAT_HOOK_SIGNAL_POINTER,
+ ptr_line->data->buffer);
}
else if (!old_line_displayed && ptr_line->data->displayed)
{
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py
index cd63a69b0..22602cc1c 100644
--- a/tests/scripts/python/testapi.py
+++ b/tests/scripts/python/testapi.py
@@ -584,8 +584,8 @@ def test_hdata():
line2 = weechat.hdata_pointer(hdata_line, line1, 'next_line')
line3 = weechat.hdata_pointer(hdata_line, line2, 'next_line')
# hdata_get_var_offset
- check(weechat.hdata_get_var_offset(hdata_buffer, 'plugin') == 0)
- check(weechat.hdata_get_var_offset(hdata_buffer, 'number') > 0)
+ check(weechat.hdata_get_var_offset(hdata_buffer, 'opening') == 0)
+ check(weechat.hdata_get_var_offset(hdata_buffer, 'plugin') > 0)
# hdata_get_var_type_string
check(weechat.hdata_get_var_type_string(hdata_buffer, 'plugin') == 'pointer')
check(weechat.hdata_get_var_type_string(hdata_buffer, 'number') == 'integer')