mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1575: Vim9: globpath() doesnot take "true" as argument
Problem: Vim9: globpath() doesnot take "true" as argument. Solution: Use tv_get_bool_chk(). (closes #6821)
This commit is contained in:
parent
5892ea1511
commit
f966ce5ea2
@ -1241,14 +1241,14 @@ f_globpath(typval_T *argvars, typval_T *rettv)
|
|||||||
rettv->v_type = VAR_STRING;
|
rettv->v_type = VAR_STRING;
|
||||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||||
{
|
{
|
||||||
if (tv_get_number_chk(&argvars[2], &error))
|
if (tv_get_bool_chk(&argvars[2], &error))
|
||||||
flags |= WILD_KEEP_ALL;
|
flags |= WILD_KEEP_ALL;
|
||||||
if (argvars[3].v_type != VAR_UNKNOWN)
|
if (argvars[3].v_type != VAR_UNKNOWN)
|
||||||
{
|
{
|
||||||
if (tv_get_number_chk(&argvars[3], &error))
|
if (tv_get_bool_chk(&argvars[3], &error))
|
||||||
rettv_list_set(rettv, NULL);
|
rettv_list_set(rettv, NULL);
|
||||||
if (argvars[4].v_type != VAR_UNKNOWN
|
if (argvars[4].v_type != VAR_UNKNOWN
|
||||||
&& tv_get_number_chk(&argvars[4], &error))
|
&& tv_get_bool_chk(&argvars[4], &error))
|
||||||
flags |= WILD_ALLLINKS;
|
flags |= WILD_ALLLINKS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1513,6 +1513,10 @@ def Test_glob()
|
|||||||
assert_equal(['runtest.vim'], glob('runtest.vim', true, true, true))
|
assert_equal(['runtest.vim'], glob('runtest.vim', true, true, true))
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_globpath()
|
||||||
|
assert_equal(['./runtest.vim'], globpath('.', 'runtest.vim', true, true, true))
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_recursive_call()
|
def Test_recursive_call()
|
||||||
assert_equal(6765, Fibonacci(20))
|
assert_equal(6765, Fibonacci(20))
|
||||||
enddef
|
enddef
|
||||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1575,
|
||||||
/**/
|
/**/
|
||||||
1574,
|
1574,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user