mirror of
https://github.com/vim/vim.git
synced 2025-08-25 19:53:53 -04:00
patch 8.2.1628: Vim9: cannot pass "true" to timer_paused()
Problem: Vim9: cannot pass "true" to timer_paused(). Solution: Use tv_get_bool(). (closes #6891)
This commit is contained in:
parent
ad30470610
commit
418155def2
@ -1678,6 +1678,14 @@ def Test_term_start()
|
|||||||
bwipe!
|
bwipe!
|
||||||
enddef
|
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()
|
def Test_win_splitmove()
|
||||||
split
|
split
|
||||||
win_splitmove(1, 2, #{vertical: true, rightbelow: true})
|
win_splitmove(1, 2, #{vertical: true, rightbelow: true})
|
||||||
|
@ -742,7 +742,7 @@ f_timer_info(typval_T *argvars, typval_T *rettv)
|
|||||||
f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
|
f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
|
||||||
{
|
{
|
||||||
timer_T *timer = NULL;
|
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)
|
if (argvars[0].v_type != VAR_NUMBER)
|
||||||
emsg(_(e_number_exp));
|
emsg(_(e_number_exp));
|
||||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1628,
|
||||||
/**/
|
/**/
|
||||||
1627,
|
1627,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user