diff options
author | skippi <jbtcao@gmail.com> | 2020-10-25 18:48:41 -0500 |
---|---|---|
committer | skippi <jbtcao@gmail.com> | 2020-10-26 15:22:23 -0500 |
commit | f8fd3d44ac7a89d5573b93a16896abb457e528e0 (patch) | |
tree | 641679cbf2d9f6db99bc837fdc340e5996235dc5 /src/nvim/ex_getln.c | |
parent | c203f89ace4617681fe0feb9f535c74ed0910796 (diff) | |
download | rneovim-f8fd3d44ac7a89d5573b93a16896abb457e528e0.tar.gz rneovim-f8fd3d44ac7a89d5573b93a16896abb457e528e0.tar.bz2 rneovim-f8fd3d44ac7a89d5573b93a16896abb457e528e0.zip |
vim-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 vim/vim#4760)
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index c56adc8bd4..d67e9b2d7e 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -4990,7 +4990,7 @@ ExpandFromContext ( char_u *pat, int *num_file, char_u ***file, - int options /* EW_ flags */ + int options // WILD_ flags ) { regmatch_T regmatch; @@ -5053,7 +5053,7 @@ ExpandFromContext ( if (free_pat) xfree(pat); #ifdef BACKSLASH_IN_FILENAME - if (p_csl[0] != NUL) { + if (p_csl[0] != NUL && (options & WILD_IGNORE_COMPLETESLASH) == 0) { for (int i = 0; i < *num_file; i++) { char_u *ptr = (*file)[i]; while (*ptr != NUL) { |