diff src/window.c @ 29853:31c598083364 v9.0.0265

patch 9.0.0265: no good reason why the "gf" command isn't in the tiny version Commit: https://github.com/vim/vim/commit/f80f40a55ccff0a4331c5fbd1ac446511f622ed0 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 25 16:02:23 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 25 Aug 2022 17:15:03 +0200
parents 6c7eddcce52c
children c9ff1715f03d
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -136,10 +136,8 @@ do_window(
 {
     long	Prenum1;
     win_T	*wp;
-#if defined(FEAT_SEARCHPATH) || defined(FEAT_FIND_ID)
     char_u	*ptr;
     linenr_T    lnum = -1;
-#endif
 #ifdef FEAT_FIND_ID
     int		type = FIND_DEFINE;
     int		len;
@@ -521,7 +519,6 @@ newwindow:
 		do_nv_ident(Ctrl_RSB, NUL);
 		break;
 
-#ifdef FEAT_SEARCHPATH
 // edit file name under cursor in a new window
     case 'f':
     case 'F':
@@ -534,9 +531,9 @@ wingotofile:
 		{
 		    tabpage_T	*oldtab = curtab;
 		    win_T	*oldwin = curwin;
-# ifdef FEAT_GUI
+#ifdef FEAT_GUI
 		    need_mouse_correct = TRUE;
-# endif
+#endif
 		    setpcmark();
 		    if (win_split(0, 0) == OK)
 		    {
@@ -559,7 +556,6 @@ wingotofile:
 		    vim_free(ptr);
 		}
 		break;
-#endif
 
 #ifdef FEAT_FIND_ID
 // Go to the first occurrence of the identifier under cursor along path in a
@@ -637,13 +633,12 @@ wingotofile:
 			do_nv_ident('g', xchar);
 			break;
 
-#ifdef FEAT_SEARCHPATH
 		    case 'f':	    // CTRL-W gf: "gf" in a new tab page
 		    case 'F':	    // CTRL-W gF: "gF" in a new tab page
 			cmdmod.cmod_tab = tabpage_index(curtab) + 1;
 			nchar = xchar;
 			goto wingotofile;
-#endif
+
 		    case 't':	    // CTRL-W gt: go to next tab page
 			goto_tabpage((int)Prenum);
 			break;
@@ -713,11 +708,9 @@ get_wincmd_addr_type(char_u *arg, exarg_
 #if defined(FEAT_QUICKFIX)
     case '}':
 #endif
-#ifdef FEAT_SEARCHPATH
     case 'f':
     case 'F':
     case Ctrl_F:
-#endif
 #ifdef FEAT_FIND_ID
     case 'i':
     case Ctrl_I: