From f80f40a55ccff0a4331c5fbd1ac446511f622ed0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 25 Aug 2022 16:02:23 +0100 Subject: 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. --- src/ex_docmd.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/ex_docmd.c') diff --git a/src/ex_docmd.c b/src/ex_docmd.c index b9ff423b6..89c9d26b0 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; -- cgit v1.2.1