Mercurial > vim
diff src/evalfunc.c @ 17588:1348696d07cd v8.1.1791
patch 8.1.1791: 'completeslash' also applies to globpath()
commit https://github.com/vim/vim/commit/50f91d22bd81819d5d946f6c38252c7922120ec6
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 2 19:52:15 2019 +0200
patch 8.1.1791: 'completeslash' also applies to globpath()
Problem: 'completeslash' also applies to globpath().
Solution: Add the WILD_IGNORE_COMPLETESLASH flag. (test by Yasuhiro
Matsumoto, closes #4760)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 02 Aug 2019 20:00:07 +0200 |
parents | 97a750e8707f |
children | e259d11e2900 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -5878,15 +5878,15 @@ f_glob(typval_T *argvars, typval_T *rett static void f_globpath(typval_T *argvars, typval_T *rettv) { - int flags = 0; + int flags = WILD_IGNORE_COMPLETESLASH; char_u buf1[NUMBUFLEN]; char_u *file = tv_get_string_buf_chk(&argvars[1], buf1); int error = FALSE; garray_T ga; int i; - /* When the optional second argument is non-zero, don't remove matches - * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + // When the optional second argument is non-zero, don't remove matches + // for 'wildignore' and don't put matches for 'suffixes' at the end. rettv->v_type = VAR_STRING; if (argvars[2].v_type != VAR_UNKNOWN) {