mirror of
https://github.com/vim/vim.git
synced 2025-08-22 19:27:53 -04:00
patch 8.2.1572: Vim9: expand() does not take "true" as argument
Problem: Vim9: expand() does not take "true" as argument. Solution: Use tv_get_bool_chk(). (closes #6819)
This commit is contained in:
parent
119f557230
commit
551d25e765
@ -2434,7 +2434,7 @@ f_expand(typval_T *argvars, typval_T *rettv)
|
|||||||
rettv->v_type = VAR_STRING;
|
rettv->v_type = VAR_STRING;
|
||||||
if (argvars[1].v_type != VAR_UNKNOWN
|
if (argvars[1].v_type != VAR_UNKNOWN
|
||||||
&& argvars[2].v_type != VAR_UNKNOWN
|
&& argvars[2].v_type != VAR_UNKNOWN
|
||||||
&& tv_get_number_chk(&argvars[2], &error)
|
&& tv_get_bool_chk(&argvars[2], &error)
|
||||||
&& !error)
|
&& !error)
|
||||||
rettv_list_set(rettv, NULL);
|
rettv_list_set(rettv, NULL);
|
||||||
|
|
||||||
@ -2458,7 +2458,7 @@ f_expand(typval_T *argvars, typval_T *rettv)
|
|||||||
// When the optional second argument is non-zero, don't remove matches
|
// When the optional second argument is non-zero, don't remove matches
|
||||||
// for 'wildignore' and don't put matches for 'suffixes' at the end.
|
// for 'wildignore' and don't put matches for 'suffixes' at the end.
|
||||||
if (argvars[1].v_type != VAR_UNKNOWN
|
if (argvars[1].v_type != VAR_UNKNOWN
|
||||||
&& tv_get_number_chk(&argvars[1], &error))
|
&& tv_get_bool_chk(&argvars[1], &error))
|
||||||
options |= WILD_KEEP_ALL;
|
options |= WILD_KEEP_ALL;
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
|
@ -1497,6 +1497,12 @@ def Test_count()
|
|||||||
assert_equal(0, count('ABC ABC ABC', 'b', false))
|
assert_equal(0, count('ABC ABC ABC', 'b', false))
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_expand()
|
||||||
|
split SomeFile
|
||||||
|
assert_equal(['SomeFile'], expand('%', true, true))
|
||||||
|
close
|
||||||
|
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 */
|
||||||
|
/**/
|
||||||
|
1572,
|
||||||
/**/
|
/**/
|
||||||
1571,
|
1571,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user