1
0
forked from aniani/vim

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:
Bram Moolenaar
2020-09-02 21:57:07 +02:00
parent 5892ea1511
commit f966ce5ea2
3 changed files with 9 additions and 3 deletions

View File

@@ -1241,14 +1241,14 @@ f_globpath(typval_T *argvars, typval_T *rettv)
rettv->v_type = VAR_STRING;
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;
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);
if (argvars[4].v_type != VAR_UNKNOWN
&& tv_get_number_chk(&argvars[4], &error))
&& tv_get_bool_chk(&argvars[4], &error))
flags |= WILD_ALLLINKS;
}
}