# HG changeset patch # User Bram Moolenaar # Date 1599076806 -7200 # Node ID 342bcb9f7d34fe2a048bec78ae7004299ce02560 # Parent d0c7c35084c597f2c4478fbbeccf8a20a6b835b0 patch 8.2.1575: Vim9: globpath() doesnot take "true" as argument Commit: https://github.com/vim/vim/commit/f966ce5ea24748eed10f708d4f828be44887a559 Author: Bram Moolenaar Date: Wed Sep 2 21:57:07 2020 +0200 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 https://github.com/vim/vim/issues/6821) diff --git a/src/filepath.c b/src/filepath.c --- a/src/filepath.c +++ b/src/filepath.c @@ -1241,14 +1241,14 @@ f_globpath(typval_T *argvars, typval_T * 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; } } diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim --- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -1513,6 +1513,10 @@ def Test_glob() assert_equal(['runtest.vim'], glob('runtest.vim', true, true, true)) enddef +def Test_globpath() + assert_equal(['./runtest.vim'], globpath('.', 'runtest.vim', true, true, true)) +enddef + def Test_recursive_call() assert_equal(6765, Fibonacci(20)) enddef diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1575, +/**/ 1574, /**/ 1573,