diff options
Diffstat (limited to 'src/time.c')
-rw-r--r-- | src/time.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/time.c b/src/time.c index 362fd46452..bb4a202829 100644 --- a/src/time.c +++ b/src/time.c @@ -696,7 +696,8 @@ add_timer_info(typval_T *rettv, timer_T *timer) dict_add_number(dict, "remaining", (long)remaining); dict_add_number(dict, "repeat", - (long)(timer->tr_repeat < 0 ? -1 : timer->tr_repeat + 1)); + (long)(timer->tr_repeat < 0 ? -1 + : timer->tr_repeat + (timer->tr_firing ? 0 : 1))); dict_add_number(dict, "paused", (long)(timer->tr_paused)); di = dictitem_alloc((char_u *)"callback"); |