mirror of
https://github.com/vim/vim.git
synced 2025-10-12 06:44:06 -04:00
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)
This commit is contained in:
@@ -5878,15 +5878,15 @@ f_glob(typval_T *argvars, typval_T *rettv)
|
||||
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user