summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-06 18:39:38 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-06 18:39:38 +0200
commit418155def2aa45afd7fc034db341dc874b00af3a (patch)
treeda4e547acc14af8660bafcd96bb56ef94df8f255 /src
parentad30470610e228e66afb837fdbab6bea36c43de4 (diff)
downloadvim-git-418155def2aa45afd7fc034db341dc874b00af3a.tar.gz
patch 8.2.1628: Vim9: cannot pass "true" to timer_paused()v8.2.1628
Problem: Vim9: cannot pass "true" to timer_paused(). Solution: Use tv_get_bool(). (closes #6891)
Diffstat (limited to 'src')
-rw-r--r--src/testdir/test_vim9_func.vim8
-rw-r--r--src/time.c2
-rw-r--r--src/version.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index 58003414e..a3a53e6b0 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -1678,6 +1678,14 @@ def Test_term_start()
bwipe!
enddef
+def Test_timer_paused()
+ let id = timer_start(50, {-> 0})
+ timer_pause(id, true)
+ let info = timer_info(id)
+ assert_equal(1, info[0]['paused'])
+ timer_stop(id)
+enddef
+
def Test_win_splitmove()
split
win_splitmove(1, 2, #{vertical: true, rightbelow: true})
diff --git a/src/time.c b/src/time.c
index 89ff08bdf..cc29d0d39 100644
--- a/src/time.c
+++ b/src/time.c
@@ -742,7 +742,7 @@ f_timer_info(typval_T *argvars, typval_T *rettv)
f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
{
timer_T *timer = NULL;
- int paused = (int)tv_get_number(&argvars[1]);
+ int paused = (int)tv_get_bool(&argvars[1]);
if (argvars[0].v_type != VAR_NUMBER)
emsg(_(e_number_exp));
diff --git a/src/version.c b/src/version.c
index b4d576951..4d25ecc0c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1628,
+/**/
1627,
/**/
1626,