Patch 8.2.1628
Problem: Vim9: cannot pass "true" to timer_paused().
Solution: Use tv_get_bool(). (closes #6891)
Files: src/time.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1627/src/time.c 2020-06-10 16:54:09.569078300 +0200
--- src/time.c 2020-09-06 18:34:35.364720988 +0200
***************
*** 742,748 ****
f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
{
timer_T *timer = NULL;
! int paused = (int)tv_get_number(&argvars[1]);
if (argvars[0].v_type != VAR_NUMBER)
emsg(_(e_number_exp));
--- 742,748 ----
f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
{
timer_T *timer = NULL;
! int paused = (int)tv_get_bool(&argvars[1]);
if (argvars[0].v_type != VAR_NUMBER)
emsg(_(e_number_exp));
*** ../vim-8.2.1627/src/testdir/test_vim9_func.vim 2020-09-06
18:22:47.245500821 +0200
--- src/testdir/test_vim9_func.vim 2020-09-06 18:32:59.092836216 +0200
***************
*** 1678,1683 ****
--- 1678,1691 ----
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})
*** ../vim-8.2.1627/src/version.c 2020-09-06 18:22:47.249500809 +0200
--- src/version.c 2020-09-06 18:34:15.524746362 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1628,
/**/
--
ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery,
my friend and I will ... we will say "Ni!"
CRONE: Do your worst!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202009061640.086Ge3nr946334%40masaka.moolenaar.net.