diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-02 21:37:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-02 21:37:56 +0200 |
commit | 551d25e76545df785a9f62df52f34bc1dd368bfb (patch) | |
tree | 2ebf569d4c2a35c6c37eca700907cd5f44ac3226 /src/evalfunc.c | |
parent | 119f5572306c4abba91eaf446c0c52637db223e8 (diff) | |
download | vim-git-551d25e76545df785a9f62df52f34bc1dd368bfb.tar.gz |
patch 8.2.1572: Vim9: expand() does not take "true" as argumentv8.2.1572
Problem: Vim9: expand() does not take "true" as argument.
Solution: Use tv_get_bool_chk(). (closes #6819)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 771e393db..69f781632 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2434,7 +2434,7 @@ f_expand(typval_T *argvars, typval_T *rettv) 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) + && tv_get_bool_chk(&argvars[2], &error) && !error) 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 // 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)) + && tv_get_bool_chk(&argvars[1], &error)) options |= WILD_KEEP_ALL; if (!error) { |