0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2015-03-21 17:32:19 +01:00
parent 4df702999d
commit b5971141df
13 changed files with 62 additions and 21 deletions

View File

@@ -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;
}