mirror of
https://github.com/neovim/neovim.git
synced 2025-11-24 11:10:38 +00:00
Linting.
This commit is contained in:
@@ -4017,20 +4017,19 @@ static void expand_shellcmd(char_u *filepat, int *num_file, char_u ***file,
|
|||||||
*/
|
*/
|
||||||
ga_init(&ga, (int)sizeof(char *), 10);
|
ga_init(&ga, (int)sizeof(char *), 10);
|
||||||
for (s = path; ; s = e) {
|
for (s = path; ; s = e) {
|
||||||
if (*s == NUL)
|
if (*s == NUL) {
|
||||||
{
|
|
||||||
if (did_curdir) {
|
if (did_curdir) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Find directories in the current directory, path is empty.
|
// Find directories in the current directory, path is empty.
|
||||||
did_curdir = true;
|
did_curdir = true;
|
||||||
}
|
} else if (*s == '.') {
|
||||||
else if (*s == '.') {
|
|
||||||
did_curdir = true;
|
did_curdir = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*s == ' ')
|
if (*s == ' ') {
|
||||||
++s; /* Skip space used for absolute path name. */
|
s++; // Skip space used for absolute path name.
|
||||||
|
}
|
||||||
|
|
||||||
e = vim_strchr(s, ':');
|
e = vim_strchr(s, ':');
|
||||||
if (e == NULL)
|
if (e == NULL)
|
||||||
|
|||||||
@@ -576,10 +576,11 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|
|||||||
if ((dir && !(flags & EW_DIR)) || (!dir && !(flags & EW_FILE)))
|
if ((dir && !(flags & EW_DIR)) || (!dir && !(flags & EW_FILE)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Skip files that are not executable if we check for that. */
|
// Skip files that are not executable if we check for that.
|
||||||
if (!dir && (flags & EW_EXEC)
|
if (!dir && (flags & EW_EXEC)
|
||||||
&& !os_can_exe((*file)[i], NULL, !(flags & EW_SHELLCMD)))
|
&& !os_can_exe((*file)[i], NULL, !(flags & EW_SHELLCMD))) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
p = xmalloc(STRLEN((*file)[i]) + 1 + dir);
|
p = xmalloc(STRLEN((*file)[i]) + 1 + dir);
|
||||||
STRCPY(p, (*file)[i]);
|
STRCPY(p, (*file)[i]);
|
||||||
|
|||||||
@@ -1321,8 +1321,9 @@ void addfile(
|
|||||||
// If the file isn't executable, may not add it. Do accept directories.
|
// If the file isn't executable, may not add it. Do accept directories.
|
||||||
// When invoked from expand_shellcmd() do not use $PATH.
|
// When invoked from expand_shellcmd() do not use $PATH.
|
||||||
if (!isdir && (flags & EW_EXEC)
|
if (!isdir && (flags & EW_EXEC)
|
||||||
&& !os_can_exe(f, NULL, !(flags & EW_SHELLCMD)))
|
&& !os_can_exe(f, NULL, !(flags & EW_SHELLCMD))) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
char_u *p = xmalloc(STRLEN(f) + 1 + isdir);
|
char_u *p = xmalloc(STRLEN(f) + 1 + isdir);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user