Patch 8.2.1574
Problem: Vim9: glob() doesnot take "true" as argument.
Solution: Use tv_get_bool_chk(). (closes #6821)
Files: src/filepath.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1573/src/filepath.c 2020-08-19 16:00:02.086372657 +0200
--- src/filepath.c 2020-09-02 21:50:50.923429866 +0200
***************
*** 1174,1187 ****
rettv->v_type = VAR_STRING;
if (argvars[1].v_type != VAR_UNKNOWN)
{
! if (tv_get_number_chk(&argvars[1], &error))
options |= WILD_KEEP_ALL;
if (argvars[2].v_type != VAR_UNKNOWN)
{
! if (tv_get_number_chk(&argvars[2], &error))
rettv_list_set(rettv, NULL);
if (argvars[3].v_type != VAR_UNKNOWN
! && tv_get_number_chk(&argvars[3], &error))
options |= WILD_ALLLINKS;
}
}
--- 1174,1187 ----
rettv->v_type = VAR_STRING;
if (argvars[1].v_type != VAR_UNKNOWN)
{
! if (tv_get_bool_chk(&argvars[1], &error))
options |= WILD_KEEP_ALL;
if (argvars[2].v_type != VAR_UNKNOWN)
{
! if (tv_get_bool_chk(&argvars[2], &error))
rettv_list_set(rettv, NULL);
if (argvars[3].v_type != VAR_UNKNOWN
! && tv_get_bool_chk(&argvars[3], &error))
options |= WILD_ALLLINKS;
}
}
*** ../vim-8.2.1573/src/testdir/test_vim9_func.vim 2020-09-02
21:45:50.404307575 +0200
--- src/testdir/test_vim9_func.vim 2020-09-02 21:50:25.875502869 +0200
***************
*** 1509,1514 ****
--- 1509,1518 ----
assert_equal(lines, getreg('a', true, true))
enddef
+ def Test_glob()
+ assert_equal(['runtest.vim'], glob('runtest.vim', true, true, true))
+ enddef
+
def Test_recursive_call()
assert_equal(6765, Fibonacci(20))
enddef
*** ../vim-8.2.1573/src/version.c 2020-09-02 21:45:50.404307575 +0200
--- src/version.c 2020-09-02 21:50:05.755561556 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1574,
/**/
--
GUARD #2: It could be carried by an African swallow!
GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow,
that's my point.
GUARD #2: Oh, yeah, I agree with that...
The Quest for the Holy Grail (Monty Python)
/// 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/202009021953.082JruAK3687758%40masaka.moolenaar.net.