To: vim_dev@googlegroups.com Subject: Patch 8.2.1575 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1575 Problem: Vim9: globpath() doesnot take "true" as argument. Solution: Use tv_get_bool_chk(). (closes #6821) Files: src/filepath.c, src/testdir/test_vim9_func.vim *** ../vim-8.2.1574/src/filepath.c 2020-09-02 21:53:07.195054359 +0200 --- src/filepath.c 2020-09-02 21:56:08.558572208 +0200 *************** *** 1241,1254 **** rettv->v_type = VAR_STRING; if (argvars[2].v_type != VAR_UNKNOWN) { ! if (tv_get_number_chk(&argvars[2], &error)) flags |= WILD_KEEP_ALL; if (argvars[3].v_type != VAR_UNKNOWN) { ! if (tv_get_number_chk(&argvars[3], &error)) rettv_list_set(rettv, NULL); if (argvars[4].v_type != VAR_UNKNOWN ! && tv_get_number_chk(&argvars[4], &error)) flags |= WILD_ALLLINKS; } } --- 1241,1254 ---- rettv->v_type = VAR_STRING; if (argvars[2].v_type != VAR_UNKNOWN) { ! if (tv_get_bool_chk(&argvars[2], &error)) flags |= WILD_KEEP_ALL; if (argvars[3].v_type != VAR_UNKNOWN) { ! if (tv_get_bool_chk(&argvars[3], &error)) rettv_list_set(rettv, NULL); if (argvars[4].v_type != VAR_UNKNOWN ! && tv_get_bool_chk(&argvars[4], &error)) flags |= WILD_ALLLINKS; } } *** ../vim-8.2.1574/src/testdir/test_vim9_func.vim 2020-09-02 21:53:07.195054359 +0200 --- src/testdir/test_vim9_func.vim 2020-09-02 21:55:22.606695576 +0200 *************** *** 1513,1518 **** --- 1513,1522 ---- 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 *** ../vim-8.2.1574/src/version.c 2020-09-02 21:53:07.195054359 +0200 --- src/version.c 2020-09-02 21:56:34.942501057 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1575, /**/ -- ARTHUR: Will you ask your master if he wants to join my court at Camelot?! GUARD #1: But then of course African swallows are not migratory. GUARD #2: Oh, yeah... GUARD #1: So they couldn't bring a coconut back anyway... The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///