diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-25 22:21:19 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-04-25 22:22:40 +0800 |
commit | 255e547e18e127ab70ffa2e423f7753786cb424e (patch) | |
tree | 1df89958514bdc37d013ad478d6e22177b000a54 /src/nvim/eval/funcs.c | |
parent | bfa92d3861e425b59f9b1793c08247965a8e53f5 (diff) | |
download | rneovim-255e547e18e127ab70ffa2e423f7753786cb424e.tar.gz rneovim-255e547e18e127ab70ffa2e423f7753786cb424e.tar.bz2 rneovim-255e547e18e127ab70ffa2e423f7753786cb424e.zip |
fix(timer): allow timer_info() to get info about current timer
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 72e25411ff..3cf18e1c68 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -8944,7 +8944,7 @@ static void f_timer_info(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) } tv_list_alloc_ret(rettv, 1); timer_T *timer = find_timer_by_nr(tv_get_number(&argvars[0])); - if (timer != NULL && !timer->stopped) { + if (timer != NULL && (!timer->stopped || timer->refcount > 1)) { add_timer_info(rettv, timer); } } else { |