0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.0265: no good reason why the "gf" command isn't in the tiny version

Problem:    No good reason why the "gf" command is not in the tiny version.
Solution:   Graduate the file_in_path feature.
This commit is contained in:
Bram Moolenaar
2022-08-25 16:02:23 +01:00
parent b213703f35
commit f80f40a55c
25 changed files with 20 additions and 157 deletions

View File

@@ -942,7 +942,6 @@ findfilendir(
typval_T *rettv,
int find_what UNUSED)
{
#ifdef FEAT_SEARCHPATH
char_u *fname;
char_u *fresult = NULL;
char_u *path = *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path;
@@ -951,7 +950,6 @@ findfilendir(
int count = 1;
int first = TRUE;
int error = FALSE;
#endif
rettv->vval.v_string = NULL;
rettv->v_type = VAR_STRING;
@@ -962,7 +960,6 @@ findfilendir(
&& check_for_opt_number_arg(argvars, 2) == FAIL)))
return;
#ifdef FEAT_SEARCHPATH
fname = tv_get_string(&argvars[0]);
if (argvars[1].v_type != VAR_UNKNOWN)
@@ -1006,7 +1003,6 @@ findfilendir(
if (rettv->v_type == VAR_STRING)
rettv->vval.v_string = fresult;
#endif
}
/*
@@ -3879,9 +3875,7 @@ gen_expand_wildcards(
static int recursive = FALSE;
int add_pat;
int retval = OK;
#if defined(FEAT_SEARCHPATH)
int did_expand_in_path = FALSE;
#endif
/*
* expand_env() is called to expand things like "~user". If this fails,
@@ -3971,7 +3965,6 @@ gen_expand_wildcards(
*/
if (mch_has_exp_wildcard(p) || (flags & EW_ICASE))
{
#if defined(FEAT_SEARCHPATH)
if ((flags & EW_PATH)
&& !mch_isFullName(p)
&& !(p[0] == '.'
@@ -3987,7 +3980,6 @@ gen_expand_wildcards(
did_expand_in_path = TRUE;
}
else
#endif
add_pat = mch_expandpath(&ga, p, flags);
}
}
@@ -4007,10 +3999,8 @@ gen_expand_wildcards(
vim_free(t);
}
#if defined(FEAT_SEARCHPATH)
if (did_expand_in_path && ga.ga_len > 0 && (flags & EW_PATH))
uniquefy_paths(&ga, p);
#endif
if (p != pat[i])
vim_free(p);
}