diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-03-21 17:32:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-03-21 17:32:19 +0100 |
commit | b5971141dff0c69355fd64196fcc0d0d071d4c82 (patch) | |
tree | f2a062bcfa6558a9bd58d24c23924d403ec39170 /src/misc1.c | |
parent | 4df702999d14955255fcdfb820511767dcfec463 (diff) | |
download | vim-git-b5971141dff0c69355fd64196fcc0d0d071d4c82.tar.gz |
updated for version 7.4.672v7.4.672
Problem: When completing a shell command, directories in the current
directory are not listed.
Solution: When "." is not in $PATH also look in the current directory for
directories.
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc1.c b/src/misc1.c index 940a3e917..bd1fe255b 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -10987,8 +10987,10 @@ addfile(gap, f, flags) if ((isdir && !(flags & EW_DIR)) || (!isdir && !(flags & EW_FILE))) return; - /* If the file isn't executable, may not add it. Do accept directories. */ - if (!isdir && (flags & EW_EXEC) && !mch_can_exe(f, NULL)) + /* If the file isn't executable, may not add it. Do accept directories. + * When invoked from expand_shellcmd() do not use $PATH. */ + if (!isdir && (flags & EW_EXEC) + && !mch_can_exe(f, NULL, !(flags & EW_SHELLCMD))) return; /* Make room for another item in the file list. */ |