summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-03 20:43:08 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-03 20:43:08 +0100
commit8a37b032895b40dd6953280c33585bcba0c7ef8b (patch)
treec39fe8ece690663f153d7d27c5baaf7baba76e47 /src/misc1.c
parentec48a9c58989babcad23d73483955f35b6e41492 (diff)
patch 8.0.1464: completing directory after :find does not add slashv8.0.1464
Problem: Completing directory after :find does not add slash. Solution: Adjust the flags for globpath(). (Genki Sky)
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 2d635d677f..726500a4c8 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -10761,6 +10761,7 @@ expand_in_path(
char_u *curdir;
garray_T path_ga;
char_u *paths = NULL;
+ int glob_flags = 0;
if ((curdir = alloc((unsigned)MAXPATHL)) == NULL)
return 0;
@@ -10777,7 +10778,11 @@ expand_in_path(
if (paths == NULL)
return 0;
- globpath(paths, pattern, gap, (flags & EW_ICASE) ? WILD_ICASE : 0);
+ if (flags & EW_ICASE)
+ glob_flags |= WILD_ICASE;
+ if (flags & EW_ADDSLASH)
+ glob_flags |= WILD_ADD_SLASH;
+ globpath(paths, pattern, gap, glob_flags);
vim_free(paths);
return gap->ga_len;