summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-25 16:02:23 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-25 16:02:23 +0100
commitf80f40a55ccff0a4331c5fbd1ac446511f622ed0 (patch)
tree6a43d76ea652831205c8df6439b98717a6425188 /src/ex_docmd.c
parentb213703f358e1e10ba0affb3729c09ccb2c88ea3 (diff)
patch 9.0.0265: no good reason why the "gf" command isn't in the tiny versionv9.0.0265
Problem: No good reason why the "gf" command is not in the tiny version. Solution: Graduate the file_in_path feature.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index b9ff423b64..89c9d26b0f 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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;