changeset 28725:075787b91e09 v8.2.4887

patch 8.2.4887: channel log does not show invoking a timer callback Commit: https://github.com/vim/vim/commit/9b334d5912607f09912bfd19aa95355a1efc2761 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 6 14:59:04 2022 +0100 patch 8.2.4887: channel log does not show invoking a timer callback Problem: Channel log does not show invoking a timer callback. Solution: Add a ch_log() call.
author Bram Moolenaar <Bram@vim.org>
date Fri, 06 May 2022 16:00:03 +0200
parents 3aa40b1ad25e
children 47103a36fc8c
files src/time.c src/version.c
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/time.c
+++ b/src/time.c
@@ -477,6 +477,16 @@ timer_callback(timer_T *timer)
     typval_T	rettv;
     typval_T	argv[2];
 
+#ifdef FEAT_JOB_CHANNEL
+    if (ch_log_active())
+    {
+	callback_T *cb = &timer->tr_callback;
+
+	ch_log(NULL, "invoking timer callback %s",
+	       cb->cb_partial != NULL ? cb->cb_partial->pt_name : cb->cb_name);
+    }
+#endif
+
     argv[0].v_type = VAR_NUMBER;
     argv[0].vval.v_number = (varnumber_T)timer->tr_id;
     argv[1].v_type = VAR_UNKNOWN;
@@ -484,6 +494,10 @@ timer_callback(timer_T *timer)
     rettv.v_type = VAR_UNKNOWN;
     call_callback(&timer->tr_callback, -1, &rettv, 1, argv);
     clear_tv(&rettv);
+
+#ifdef FEAT_JOB_CHANNEL
+    ch_log(NULL, "timer callback finished");
+#endif
 }
 
 /*
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4887,
+/**/
     4886,
 /**/
     4885,