Patch 8.2.1572
Problem: Vim9: expand() does not take "true" as argument.
Solution: Use tv_get_bool_chk(). (closes #6819)
Files: src/evalfunc.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1571/src/evalfunc.c 2020-09-02 21:02:32.304208489 +0200
--- src/evalfunc.c 2020-09-02 21:36:01.998047313 +0200
***************
*** 2434,2440 ****
rettv->v_type = VAR_STRING;
if (argvars[1].v_type != VAR_UNKNOWN
&& argvars[2].v_type != VAR_UNKNOWN
! && tv_get_number_chk(&argvars[2], &error)
&& !error)
rettv_list_set(rettv, NULL);
--- 2434,2440 ----
rettv->v_type = VAR_STRING;
if (argvars[1].v_type != VAR_UNKNOWN
&& argvars[2].v_type != VAR_UNKNOWN
! && tv_get_bool_chk(&argvars[2], &error)
&& !error)
rettv_list_set(rettv, NULL);
***************
*** 2458,2464 ****
// When the optional second argument is non-zero, don't remove matches
// for 'wildignore' and don't put matches for 'suffixes' at the end.
if (argvars[1].v_type != VAR_UNKNOWN
! && tv_get_number_chk(&argvars[1], &error))
options |= WILD_KEEP_ALL;
if (!error)
{
--- 2458,2464 ----
// When the optional second argument is non-zero, don't remove matches
// for 'wildignore' and don't put matches for 'suffixes' at the end.
if (argvars[1].v_type != VAR_UNKNOWN
! && tv_get_bool_chk(&argvars[1], &error))
options |= WILD_KEEP_ALL;
if (!error)
{
*** ../vim-8.2.1571/src/testdir/test_vim9_func.vim 2020-09-02
21:30:04.667134268 +0200
--- src/testdir/test_vim9_func.vim 2020-09-02 21:35:27.850149775 +0200
***************
*** 1497,1502 ****
--- 1497,1508 ----
assert_equal(0, count('ABC ABC ABC', 'b', false))
enddef
+ def Test_expand()
+ split SomeFile
+ assert_equal(['SomeFile'], expand('%', true, true))
+ close
+ enddef
+
def Test_recursive_call()
assert_equal(6765, Fibonacci(20))
enddef
*** ../vim-8.2.1571/src/version.c 2020-09-02 21:30:04.667134268 +0200
--- src/version.c 2020-09-02 21:34:15.962366342 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1572,
/**/
--
Computers are not intelligent. They only think they are.
/// 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/202009021938.082Jct4U3683795%40masaka.moolenaar.net.