Patch 8.2.1573
Problem: Vim9: getreg() does not take "true" as argument.
Solution: Use tv_get_bool_chk(). (closes #6820)
Files: src/evalfunc.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1572/src/evalfunc.c 2020-09-02 21:37:50.821722181 +0200
--- src/evalfunc.c 2020-09-02 21:43:42.440682894 +0200
***************
*** 3336,3344 ****
error = strregname == NULL;
if (argvars[1].v_type != VAR_UNKNOWN)
{
! arg2 = (int)tv_get_number_chk(&argvars[1], &error);
if (!error && argvars[2].v_type != VAR_UNKNOWN)
! return_list = (int)tv_get_number_chk(&argvars[2], &error);
}
}
else
--- 3336,3344 ----
error = strregname == NULL;
if (argvars[1].v_type != VAR_UNKNOWN)
{
! arg2 = (int)tv_get_bool_chk(&argvars[1], &error);
if (!error && argvars[2].v_type != VAR_UNKNOWN)
! return_list = (int)tv_get_bool_chk(&argvars[2], &error);
}
}
else
*** ../vim-8.2.1572/src/testdir/test_vim9_func.vim 2020-09-02
21:37:50.821722181 +0200
--- src/testdir/test_vim9_func.vim 2020-09-02 21:42:49.284839146 +0200
***************
*** 1503,1508 ****
--- 1503,1514 ----
close
enddef
+ def Test_getreg()
+ let lines = ['aaa', 'bbb', 'ccc']
+ setreg('a', lines)
+ assert_equal(lines, getreg('a', true, true))
+ enddef
+
def Test_recursive_call()
assert_equal(6765, Fibonacci(20))
enddef
*** ../vim-8.2.1572/src/version.c 2020-09-02 21:37:50.821722181 +0200
--- src/version.c 2020-09-02 21:45:36.048349626 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1573,
/**/
--
I still remember when I gave up Smoking, Drinking and Sex. It was the
most *horrifying* hour of my life!
/// 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/202009021947.082JlHhS3686272%40masaka.moolenaar.net.