summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-07 22:38:47 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-07 22:38:47 +0000
commit1f35bf9cab16d3f3a63c47894c69c9aa699d8145 (patch)
tree6484c3e7edc2bcc857cb509b18c5d52d4977db59 /src/misc1.c
parenta203182302733c0ea98d66ee1f576f251697dc81 (diff)
downloadvim-git-1f35bf9cab16d3f3a63c47894c69c9aa699d8145.tar.gz
updated for version 7.0217v7.0217
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/misc1.c b/src/misc1.c
index f95d93d49..83995356f 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -8938,6 +8938,7 @@ expand_backtick(gap, pat, flags)
* Add a file to a file list. Accepted flags:
* EW_DIR add directories
* EW_FILE add files
+ * EW_EXEC add executable files
* EW_NOTFOUND add even when it doesn't exist
* EW_ADDSLASH add slash after directory name
*/
@@ -8964,6 +8965,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))
+ return;
+
/* Make room for another item in the file list. */
if (ga_grow(gap, 1) == FAIL)
return;