diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-25 13:35:50 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-25 13:35:50 +0200 |
commit | ff4596e45ca9bff5995f912efb1f49d22823c82f (patch) | |
tree | 8f0b81ed60016c5a98a3ce51058a09b588e78976 /src/core/hook/wee-hook-print.c | |
parent | cc2bb4b8cf36c7b454f5219cff5a6113e3a02cd4 (diff) | |
download | weechat-ff4596e45ca9bff5995f912efb1f49d22823c82f.zip |
core: add option `callbacks` in command `/debug`
Diffstat (limited to 'src/core/hook/wee-hook-print.c')
-rw-r--r-- | src/core/hook/wee-hook-print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hook/wee-hook-print.c b/src/core/hook/wee-hook-print.c index debdc5436..6c95e3e11 100644 --- a/src/core/hook/wee-hook-print.c +++ b/src/core/hook/wee-hook-print.c @@ -121,6 +121,7 @@ void hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line) { struct t_hook *ptr_hook, *next_hook; + struct t_hook_exec_cb hook_exec_cb; char *prefix_no_color, *message_no_color; if (!weechat_hooks[HOOK_TYPE_PRINT]) @@ -161,7 +162,7 @@ hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line) HOOK_PRINT(ptr_hook, tags_array)))) { /* run callback */ - ptr_hook->running = 1; + hook_callback_start (ptr_hook, &hook_exec_cb); (void) (HOOK_PRINT(ptr_hook, callback)) (ptr_hook->callback_pointer, ptr_hook->callback_data, @@ -172,7 +173,7 @@ hook_print_exec (struct t_gui_buffer *buffer, struct t_gui_line *line) (int)line->data->displayed, (int)line->data->highlight, (HOOK_PRINT(ptr_hook, strip_colors)) ? prefix_no_color : line->data->prefix, (HOOK_PRINT(ptr_hook, strip_colors)) ? message_no_color : line->data->message); - ptr_hook->running = 0; + hook_callback_end (ptr_hook, &hook_exec_cb); } ptr_hook = next_hook; |