From: Bram Moolenaar Date: Fri, 6 May 2022 13:59:04 +0000 (+0100) Subject: patch 8.2.4887: channel log does not show invoking a timer callback X-Git-Tag: v8.2.4887 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b334d5912607f09912bfd19aa95355a1efc2761;p=thirdparty%2Fvim.git 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. --- diff --git a/src/time.c b/src/time.c index 53ac8531b3..d76874243c 100644 --- 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 } /* diff --git a/src/version.c b/src/version.c index 6c4aa52e68..6adfeaa7a4 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4887, /**/ 4886, /**/