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/eval.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/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index 7aefdb58f..ebd7e379e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -10271,7 +10271,11 @@ f_executable(argvars, rettv) typval_T *argvars; typval_T *rettv; { - rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0]), NULL); + char_u *name = get_tv_string(&argvars[0]); + + /* Check in $PATH and also check directly if there is a directory name. */ + rettv->vval.v_number = mch_can_exe(name, NULL, TRUE) + || (gettail(name) != name && mch_can_exe(name, NULL, FALSE)); } /* @@ -10284,7 +10288,7 @@ f_exepath(argvars, rettv) { char_u *p = NULL; - (void)mch_can_exe(get_tv_string(&argvars[0]), &p); + (void)mch_can_exe(get_tv_string(&argvars[0]), &p, TRUE); rettv->v_type = VAR_STRING; rettv->vval.v_string = p; } |