Patch 8.2.1628

2 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 6, 2020, 12:40:11 PM9/6/20
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- 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 ///
Reply all
Reply to author
Forward
0 new messages