Mercurial > vim
diff src/misc1.c @ 6695:6529590f6c43 v7.4.672
updated for version 7.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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 21 Mar 2015 17:32:19 +0100 |
parents | c4cb95fb4c58 |
children | 7347229a646a |
line wrap: on
line diff
--- 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. */