mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -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:
@@ -6678,9 +6678,7 @@ ex_wrongmodifier(exarg_T *eap)
|
||||
ex_splitview(exarg_T *eap)
|
||||
{
|
||||
win_T *old_curwin = curwin;
|
||||
#if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
|
||||
char_u *fname = NULL;
|
||||
#endif
|
||||
#ifdef FEAT_BROWSE
|
||||
char_u dot_path[] = ".";
|
||||
int save_cmod_flags = cmdmod.cmod_flags;
|
||||
@@ -6708,7 +6706,6 @@ ex_splitview(exarg_T *eap)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_SEARCHPATH
|
||||
if (eap->cmdidx == CMD_sfind || eap->cmdidx == CMD_tabfind)
|
||||
{
|
||||
fname = find_file_in_path(eap->arg, (int)STRLEN(eap->arg),
|
||||
@@ -6718,11 +6715,7 @@ ex_splitview(exarg_T *eap)
|
||||
eap->arg = fname;
|
||||
}
|
||||
# ifdef FEAT_BROWSE
|
||||
else
|
||||
# endif
|
||||
#endif
|
||||
#ifdef FEAT_BROWSE
|
||||
if ((cmdmod.cmod_flags & CMOD_BROWSE)
|
||||
else if ((cmdmod.cmod_flags & CMOD_BROWSE)
|
||||
&& eap->cmdidx != CMD_vnew
|
||||
&& eap->cmdidx != CMD_new)
|
||||
{
|
||||
@@ -6786,10 +6779,8 @@ ex_splitview(exarg_T *eap)
|
||||
cmdmod.cmod_flags = save_cmod_flags;
|
||||
# endif
|
||||
|
||||
# if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
|
||||
theend:
|
||||
vim_free(fname);
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6980,7 +6971,6 @@ ex_resize(exarg_T *eap)
|
||||
static void
|
||||
ex_find(exarg_T *eap)
|
||||
{
|
||||
#ifdef FEAT_SEARCHPATH
|
||||
char_u *fname;
|
||||
int count;
|
||||
|
||||
@@ -7002,12 +6992,9 @@ ex_find(exarg_T *eap)
|
||||
if (fname != NULL)
|
||||
{
|
||||
eap->arg = fname;
|
||||
#endif
|
||||
do_exedit(eap, NULL);
|
||||
#ifdef FEAT_SEARCHPATH
|
||||
vim_free(fname);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -9273,7 +9260,6 @@ eval_vars(
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef FEAT_SEARCHPATH
|
||||
case SPEC_CFILE: // file name under cursor
|
||||
result = file_name_at_cursor(FNAME_MESS|FNAME_HYP, 1L, NULL);
|
||||
if (result == NULL)
|
||||
@@ -9283,7 +9269,6 @@ eval_vars(
|
||||
}
|
||||
resultbuf = result; // remember allocated string
|
||||
break;
|
||||
#endif
|
||||
|
||||
case SPEC_AFILE: // file name for autocommand
|
||||
result = autocmd_fname;
|
||||
|
Reference in New Issue
Block a user