diff options
-rw-r--r-- | src/nvim/testdir/test_timers.vim | 31 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 21 insertions, 12 deletions
diff --git a/src/nvim/testdir/test_timers.vim b/src/nvim/testdir/test_timers.vim index abf4e43ec3..136f32a80e 100644 --- a/src/nvim/testdir/test_timers.vim +++ b/src/nvim/testdir/test_timers.vim @@ -8,6 +8,10 @@ func MyHandler(timer) let s:val += 1 endfunc +func MyHandlerWithLists(lists, timer) + let x = string(a:lists) +endfunc + func Test_oneshot() let s:val = 0 let timer = timer_start(50, 'MyHandler') @@ -31,15 +35,20 @@ func Test_repeat_many() call assert_true(s:val < 5) endfunc -" func Test_with_partial_callback() -" let s:val = 0 -" let s:meow = {} -" function s:meow.bite(...) -" let s:val += 1 -" endfunction - -" call timer_start(50, s:meow.bite) -" sleep 200m -" call assert_equal(1, s:val) -" endfunc +func Test_with_partial_callback() + let s:val = 0 + let s:meow = {} + function s:meow.bite(...) + let s:val += 1 + endfunction + call timer_start(50, s:meow.bite) + sleep 200m + call assert_equal(1, s:val) +endfunc + +func Test_retain_partial() + call timer_start(100, function('MyHandlerWithLists', [['a']])) + call garbagecollect() + sleep 200m +endfunc " vim: ts=2 sw=0 et diff --git a/src/nvim/version.c b/src/nvim/version.c index e391c61c23..296952e45c 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -580,7 +580,7 @@ static int included_patches[] = { // 1863 NA // 1862, // 1861, - // 1860 NA + 1860, // 1859 NA // 1858 NA // 1857 NA |