From 1bfc8b9cf8771c1f979f20baffa20c1fe7671726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 10 Dec 2022 22:30:24 +0100 Subject: [PATCH] trigger: fix variables sent to focus callback (closes #1858) This fixes a regression introduced in WeeChat 3.7 by commit 0f67f55098db564c82c848262540704985790129. --- ChangeLog.adoc | 1 + src/plugins/trigger/trigger-callback.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 963e3a726..2ee0ca8e6 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -37,6 +37,7 @@ Bug fixes:: * api: fix function string_cut when there are non printable chars in suffix * api: do not expect any return value in callbacks "callback_change" and "callback_delete" of function config_new_option (scripting API) * irc: escape backslashes in raw buffer (issue #1838) + * trigger: fix variables sent to focus callback (issue #1858) Tests:: diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c index 9188cc1b3..ed0e3b8d0 100644 --- a/src/plugins/trigger/trigger-callback.c +++ b/src/plugins/trigger/trigger-callback.c @@ -1385,6 +1385,8 @@ trigger_callback_focus_cb (const void *pointer, void *data, TRIGGER_CALLBACK_CB_NEW_POINTERS; + ctx.extra_vars = weechat_hashtable_dup (info); + /* add data in hashtables used for conditions/replace/command */ trigger_callback_set_common_vars (trigger, info); ptr_value = weechat_hashtable_get (info, "_window");