Patch 9.0.0265
Problem: No good reason why the "gf" command is not in the tiny version.
Solution: Graduate the file_in_path feature.
Files: runtime/doc/editing.txt, runtime/doc/builtin.txt,
runtime/doc/cmdline.txt, runtime/doc/options.txt,
runtime/doc/tabpage.txt, runtime/doc/various.txt,
runtime/doc/windows.txt, src/alloc.c, src/buffer.c, src/errors.h,
src/evalfunc.c, src/ex_docmd.c, src/feature.h, src/filepath.c,
src/findfile.c, src/misc2.c, src/normal.c, src/option.c,
src/option.h, src/optiondefs.h, src/optionstr.c, src/register.c,
src/structs.h, src/version.c, src/window.c,
src/testdir/test_options.vim
*** ../vim-9.0.0264/runtime/doc/editing.txt 2022-06-28 11:21:05.000000000 +0100
--- runtime/doc/editing.txt 2022-08-25 15:41:56.488037160 +0100
***************
*** 247,254 ****
*:fin* *:find*
:fin[d][!] [++opt] [+cmd] {file}
Find {file} in 'path' and then |:edit| it.
- {not available when the |+file_in_path| feature was
- disabled at compile time}
:{count}fin[d][!] [++opt] [+cmd] {file}
Just like ":find", but use the {count} match in
--- 247,252 ----
***************
*** 322,329 ****
For Unix the '~' character is expanded, like in
"~user/file". Environment variables are expanded too
|expand-env|.
- {not available when the |+file_in_path| feature was
- disabled at compile time}
*v_gf*
{Visual}[count]gf Same as "gf", but the highlighted text is used as the
--- 320,325 ----
*** ../vim-9.0.0264/runtime/doc/builtin.txt 2022-08-25 12:45:17.838946073 +0100
--- runtime/doc/builtin.txt 2022-08-25 15:40:34.436085051 +0100
***************
*** 2734,2741 ****
Returns an empty string if the directory is not found.
This is quite similar to the ex-command `:find`.
- {only available when compiled with the |+file_in_path|
- feature}
Can also be used as a |method|: >
GetName()->finddir()
--- 2736,2741 ----
***************
*** 10520,10526 ****
extra_search Compiled with support for |'incsearch'| and
|'hlsearch'|
farsi Support for Farsi was removed |farsi|.
! file_in_path Compiled with support for |gf| and |<cfile>|
filterpipe When 'shelltemp' is off pipes are used for shell
read/write/filter commands
find_in_path Compiled with support for include file searches
--- 10530,10537 ----
extra_search Compiled with support for |'incsearch'| and
|'hlsearch'|
farsi Support for Farsi was removed |farsi|.
! file_in_path Compiled with support for |gf| and |<cfile>| (always
! true)
filterpipe When 'shelltemp' is off pipes are used for shell
read/write/filter commands
find_in_path Compiled with support for include file searches
*** ../vim-9.0.0264/runtime/doc/cmdline.txt 2022-06-28 11:21:05.000000000 +0100
--- runtime/doc/cmdline.txt 2022-08-25 15:41:07.324066291 +0100
***************
*** 199,207 ****
currently displayed match is used. With CTRL-W the part of
the word that was already typed is not inserted again.
- CTRL-F and CTRL-P: {only when |+file_in_path| feature is
- included}
-
*c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
*c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>*
CTRL-R CTRL-R {register CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
--- 199,204 ----
*** ../vim-9.0.0264/runtime/doc/options.txt 2022-07-31 11:37:16.447058514 +0100
--- runtime/doc/options.txt 2022-08-25 15:42:27.776018005 +0100
***************
*** 1533,1540 ****
*'cdpath'* *'cd'* *E344* *E346*
'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,")
global
- {not available when compiled without the
- |+file_in_path| feature}
This is a list of directories which will be searched when using the
|:cd|, |:tcd| and |:lcd| commands, provided that the directory being
searched for has a relative path, not an absolute part starting with
--- 1559,1564 ----
***************
*** 7697,7704 ****
*'suffixesadd'* *'sua'*
'suffixesadd' 'sua' string (default "")
local to buffer
- {not available when compiled without the
- |+file_in_path| feature}
Comma-separated list of suffixes, which are used when searching for a
file for the "gf", "[I", etc. commands. Example: >
:set suffixesadd=.java
--- 7724,7729 ----
*** ../vim-9.0.0264/runtime/doc/tabpage.txt 2022-06-28 11:21:06.000000000 +0100
--- runtime/doc/tabpage.txt 2022-08-25 15:42:43.060008476 +0100
***************
*** 81,88 ****
:[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
Open a new tab page and edit {file} in 'path', like with
|:find|. For [count] see |:tabnew| above.
- {not available when the |+file_in_path| feature was disabled
- at compile time}
:[count]tab {cmd} *:tab*
Execute {cmd} and when it opens a new window open a new tab
--- 81,86 ----
*** ../vim-9.0.0264/runtime/doc/various.txt 2022-08-16 20:23:57.394232793 +0100
--- runtime/doc/various.txt 2022-08-25 15:43:31.079977815 +0100
***************
*** 332,338 ****
*+ARP* Amiga only: ARP support included
B *+arabic* |Arabic| language support
B *+autochdir* support 'autochdir' option
! T *+autocmd* |:autocmd|, automatic commands
H *+autoservername* Automatically enable |clientserver|
m *+balloon_eval* |balloon-eval| support in the GUI. Included when
compiling with supported GUI (Motif, GTK, GUI) and
--- 332,339 ----
*+ARP* Amiga only: ARP support included
B *+arabic* |Arabic| language support
B *+autochdir* support 'autochdir' option
! T *+autocmd* |:autocmd|, automatic commands. Always enabled since
! 8.0.1564
H *+autoservername* Automatically enable |clientserver|
m *+balloon_eval* |balloon-eval| support in the GUI. Included when
compiling with supported GUI (Motif, GTK, GUI) and
***************
*** 373,379 ****
T *+ex_extra* always on now, used to be for Vim's extra Ex commands
N *+extra_search* |'hlsearch'| and |'incsearch'| options.
- *+farsi* Removed: |farsi| language
! N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>|
N *+find_in_path* include file searches: |[I|, |:isearch|,
|CTRL-W_CTRL-I|, |:checkpath|, etc.
N *+folding* |folding|
--- 374,381 ----
T *+ex_extra* always on now, used to be for Vim's extra Ex commands
N *+extra_search* |'hlsearch'| and |'incsearch'| options.
- *+farsi* Removed: |farsi| language
! T *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>| Always enabled since
! 9.0.265
N *+find_in_path* include file searches: |[I|, |:isearch|,
|CTRL-W_CTRL-I|, |:checkpath|, etc.
N *+folding* |folding|
*** ../vim-9.0.0264/runtime/doc/windows.txt 2022-06-28 11:21:08.000000000 +0100
--- runtime/doc/windows.txt 2022-08-25 15:44:11.175951469 +0100
***************
*** 841,870 ****
If the name is a hypertext link that looks like
"type://machine/path", only "/path" is used.
If a count is given, the count'th matching file is edited.
- {not available when the |+file_in_path| feature was disabled
- at compile time}
CTRL-W F *CTRL-W_F*
Split current window in two. Edit file name under cursor and
jump to the line number following the file name. See |gF| for
details on how the line number is obtained.
- {not available when the |+file_in_path| feature was disabled
- at compile time}
CTRL-W gf *CTRL-W_gf*
Open a new tab page and edit the file name under the cursor.
Like "tab split" and "gf", but the new tab page isn't created
if the file does not exist.
- {not available when the |+file_in_path| feature was disabled
- at compile time}
CTRL-W gF *CTRL-W_gF*
Open a new tab page and edit the file name under the cursor
and jump to the line number following the file name. Like
"tab split" and "gF", but the new tab page isn't created if
the file does not exist.
- {not available when the |+file_in_path| feature was disabled
- at compile time}
CTRL-W gt *CTRL-W_gt*
Go to next tab page, same as `gt`.
--- 843,864 ----
*** ../vim-9.0.0264/src/alloc.c 2022-07-01 12:13:12.463831288 +0100
--- src/alloc.c 2022-08-25 15:44:38.371933177 +0100
***************
*** 158,167 ****
void *
alloc_id(size_t size, alloc_id_T id UNUSED)
{
! #ifdef FEAT_EVAL
if (alloc_fail_id == id && alloc_does_fail(size))
return NULL;
! #endif
return lalloc(size, TRUE);
}
#endif
--- 158,167 ----
void *
alloc_id(size_t size, alloc_id_T id UNUSED)
{
! # ifdef FEAT_EVAL
if (alloc_fail_id == id && alloc_does_fail(size))
return NULL;
! # endif
return lalloc(size, TRUE);
}
#endif
***************
*** 425,433 ****
}
free_titles();
- # if defined(FEAT_SEARCHPATH)
free_findfile();
- # endif
// Obviously named calls.
free_all_autocmds();
--- 425,431 ----
*** ../vim-9.0.0264/src/buffer.c 2022-08-25 15:11:11.396084550 +0100
--- src/buffer.c 2022-08-25 15:44:59.523918790 +0100
***************
*** 2324,2332 ****
clear_string_option(&buf->b_s.b_p_spl);
clear_string_option(&buf->b_s.b_p_spo);
#endif
- #ifdef FEAT_SEARCHPATH
clear_string_option(&buf->b_p_sua);
- #endif
clear_string_option(&buf->b_p_ft);
clear_string_option(&buf->b_p_cink);
clear_string_option(&buf->b_p_cino);
--- 2324,2330 ----
*** ../vim-9.0.0264/src/errors.h 2022-08-25 15:11:11.400084545 +0100
--- src/errors.h 2022-08-25 15:50:15.199688449 +0100
***************
*** 853,859 ****
EXTERN char e_invalid_path_number_must_be_at_end_of_path_or_be_followed_by_str[]
INIT(= N_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."));
#endif
- #ifdef FEAT_SEARCHPATH
EXTERN char e_cant_find_directory_str_in_cdpath[]
INIT(= N_("E344: Can't find directory \"%s\" in cdpath"));
EXTERN char e_cant_find_file_str_in_path[]
--- 853,858 ----
***************
*** 862,868 ****
INIT(= N_("E346: No more directory \"%s\" found in cdpath"));
EXTERN char e_no_more_file_str_found_in_path[]
INIT(= N_("E347: No more file \"%s\" found in path"));
- #endif
EXTERN char e_no_string_under_cursor[]
INIT(= N_("E348: No string under cursor"));
EXTERN char e_no_identifier_under_cursor[]
--- 861,866 ----
***************
*** 1090,1101 ****
INIT(= N_("E444: Cannot close last window"));
EXTERN char e_other_window_contains_changes[]
INIT(= N_("E445: Other window contains changes"));
- #ifdef FEAT_SEARCHPATH
EXTERN char e_no_file_name_under_cursor[]
INIT(= N_("E446: No file name under cursor"));
EXTERN char e_cant_find_file_str_in_path_2[]
INIT(= N_("E447: Can't find file \"%s\" in path"));
- #endif
#ifdef USING_LOAD_LIBRARY
EXTERN char e_could_not_load_library_function_str[]
INIT(= N_("E448: Could not load library function %s"));
--- 1088,1097 ----
*** ../vim-9.0.0264/src/evalfunc.c 2022-08-22 13:14:31.892769316 +0100
--- src/evalfunc.c 2022-08-25 15:45:21.359903782 +0100
***************
*** 5646,5658 ****
0
#endif
},
! {"file_in_path",
! #ifdef FEAT_SEARCHPATH
! 1
! #else
! 0
! #endif
! },
{"filterpipe",
#if defined(FEAT_FILTERPIPE) && !defined(VIMDLL)
1
--- 5646,5652 ----
0
#endif
},
! {"file_in_path", 1},
{"filterpipe",
#if defined(FEAT_FILTERPIPE) && !defined(VIMDLL)
1
*** ../vim-9.0.0264/src/ex_docmd.c 2022-08-25 15:11:11.404084538 +0100
--- src/ex_docmd.c 2022-08-25 15:47:10.007826788 +0100
***************
*** 6678,6686 ****
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;
--- 6678,6684 ----
***************
*** 6708,6714 ****
}
#endif
- #ifdef FEAT_SEARCHPATH
if (eap->cmdidx == CMD_sfind || eap->cmdidx == CMD_tabfind)
{
fname = find_file_in_path(eap->arg, (int)STRLEN(eap->arg),
--- 6706,6711 ----
***************
*** 6718,6728 ****
eap->arg = fname;
}
# ifdef FEAT_BROWSE
! else
! # endif
! #endif
! #ifdef FEAT_BROWSE
! if ((cmdmod.cmod_flags & CMOD_BROWSE)
&& eap->cmdidx != CMD_vnew
&& eap->cmdidx != CMD_new)
{
--- 6715,6721 ----
eap->arg = fname;
}
# ifdef FEAT_BROWSE
! else if ((cmdmod.cmod_flags & CMOD_BROWSE)
&& eap->cmdidx != CMD_vnew
&& eap->cmdidx != CMD_new)
{
***************
*** 6786,6795 ****
cmdmod.cmod_flags = save_cmod_flags;
# endif
- # if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
theend:
vim_free(fname);
- # endif
}
/*
--- 6779,6786 ----
***************
*** 6980,6986 ****
static void
ex_find(exarg_T *eap)
{
- #ifdef FEAT_SEARCHPATH
char_u *fname;
int count;
--- 6971,6976 ----
***************
*** 7002,7013 ****
if (fname != NULL)
{
eap->arg = fname;
- #endif
do_exedit(eap, NULL);
- #ifdef FEAT_SEARCHPATH
vim_free(fname);
}
- #endif
}
/*
--- 6992,7000 ----
***************
*** 9273,9279 ****
}
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)
--- 9260,9265 ----
***************
*** 9283,9289 ****
}
resultbuf = result; // remember allocated string
break;
- #endif
case SPEC_AFILE: // file name for autocommand
result = autocmd_fname;
--- 9269,9274 ----
*** ../vim-9.0.0264/src/feature.h 2022-08-16 20:23:57.398232761 +0100
--- src/feature.h 2022-08-25 15:51:54.479611537 +0100
***************
*** 97,102 ****
--- 97,103 ----
* These features used to be optional but are now always enabled:
* +windows Multiple windows. Without this there is no help
* window and no status lines.
+ * +autocmd Automatic commands
* +vertsplit Vertically split windows.
* +cmdhist Command line history.
* +localmap Mappings and abbreviations local to a buffer.
***************
*** 115,120 ****
--- 116,122 ----
* +cindent C code indenting (From Eric Fischer).
* +smartindent smart C code indenting when the 'si' option is set.
* +textobjects Text objects: "vaw", "das", etc.
+ * +file_in_path "gf" and "<cfile>" commands.
*
* Obsolete:
* +tag_old_static Old style static tags: "file:tag file ..".
***************
*** 202,220 ****
#endif
/*
- * +file_in_path "gf" and "<cfile>" commands.
- */
- #ifdef FEAT_NORMAL
- # define FEAT_SEARCHPATH
- #endif
-
- /*
* +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
*/
#ifdef FEAT_NORMAL
! # ifdef FEAT_SEARCHPATH // FEAT_SEARCHPATH is required
! # define FEAT_FIND_ID
! # endif
#endif
/*
--- 204,213 ----
#endif
/*
* +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
*/
#ifdef FEAT_NORMAL
! # define FEAT_FIND_ID
#endif
/*
***************
*** 324,330 ****
/*
* +diff Displaying diffs in a nice way.
- * Requires +windows and +autocmd.
* Can be enabled in autoconf already.
*/
#if defined(FEAT_NORMAL) && !defined(FEAT_DIFF)
--- 317,322 ----
***************
*** 380,393 ****
/*
* +syntax syntax highlighting. When using this, it's a good
! * idea to have +autocmd and +eval too.
*/
#if defined(FEAT_NORMAL) || defined(PROTO)
# define FEAT_SYN_HL
#endif
/*
! * +conceal 'conceal' option. Needs syntax highlighting
* as this is how the concealed text is defined.
*/
#if defined(FEAT_BIG) && defined(FEAT_SYN_HL)
--- 372,385 ----
/*
* +syntax syntax highlighting. When using this, it's a good
! * idea to have +eval too.
*/
#if defined(FEAT_NORMAL) || defined(PROTO)
# define FEAT_SYN_HL
#endif
/*
! * +conceal 'conceal' option. Depends on syntax highlighting
* as this is how the concealed text is defined.
*/
#if defined(FEAT_BIG) && defined(FEAT_SYN_HL)
*** ../vim-9.0.0264/src/filepath.c 2022-08-20 19:26:11.039073212 +0100
--- src/filepath.c 2022-08-25 15:47:33.767809477 +0100
***************
*** 942,948 ****
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;
--- 942,947 ----
***************
*** 951,957 ****
int count = 1;
int first = TRUE;
int error = FALSE;
- #endif
rettv->vval.v_string = NULL;
rettv->v_type = VAR_STRING;
--- 950,955 ----
***************
*** 962,968 ****
&& 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)
--- 960,965 ----
***************
*** 1006,1012 ****
if (rettv->v_type == VAR_STRING)
rettv->vval.v_string = fresult;
- #endif
}
/*
--- 1003,1008 ----
***************
*** 3879,3887 ****
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,
--- 3875,3881 ----
***************
*** 3971,3977 ****
*/
if (mch_has_exp_wildcard(p) || (flags & EW_ICASE))
{
- #if defined(FEAT_SEARCHPATH)
if ((flags & EW_PATH)
&& !mch_isFullName(p)
&& !(p[0] == '.'
--- 3965,3970 ----
***************
*** 3987,3993 ****
did_expand_in_path = TRUE;
}
else
- #endif
add_pat = mch_expandpath(&ga, p, flags);
}
}
--- 3980,3985 ----
***************
*** 4007,4016 ****
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);
}
--- 3999,4006 ----
*** ../vim-9.0.0264/src/findfile.c 2022-08-01 11:38:13.515497865 +0100
--- src/findfile.c 2022-08-25 15:48:04.491786892 +0100
***************
*** 709,722 ****
char_u *path_end = NULL;
#endif
ff_stack_T *stackp;
- #if defined(FEAT_SEARCHPATH) || defined(FEAT_PATH_EXTRA)
int len;
- #endif
int i;
char_u *p;
- #ifdef FEAT_SEARCHPATH
char_u *suf;
- #endif
ff_search_ctx_T *search_ctx;
if (search_ctx_arg == NULL)
--- 709,718 ----
***************
*** 995,1008 ****
* Try without extra suffix and then with suffixes
* from 'suffixesadd'.
*/
- #ifdef FEAT_SEARCHPATH
len = (int)STRLEN(file_path);
if (search_ctx->ffsc_tagfile)
suf = (char_u *)"";
else
suf = curbuf->b_p_sua;
for (;;)
- #endif
{
// if file exists and we didn't already find it
if ((path_with_url(file_path)
--- 991,1002 ----
***************
*** 1072,1084 ****
return file_path;
}
- #ifdef FEAT_SEARCHPATH
// Not found or found already, try next suffix.
if (*suf == NUL)
break;
copy_option_part(&suf, file_path + len,
MAXPATHL - len, ",");
- #endif
}
}
}
--- 1066,1076 ----
***************
*** 1633,1639 ****
}
#endif
- #if defined(FEAT_SEARCHPATH) || defined(PROTO)
/*
* Find the file name "ptr[len]" in the path. Also finds directory names.
*
--- 1625,1630 ----
***************
*** 2636,2642 ****
return gap->ga_len;
}
- #endif // FEAT_SEARCHPATH
/*
* Converts a file name into a canonical form. It simplifies a file name into
--- 2627,2632 ----
*** ../vim-9.0.0264/src/misc2.c 2022-08-16 20:23:57.398232761 +0100
--- src/misc2.c 2022-08-25 15:48:29.051768684 +0100
***************
*** 2399,2413 ****
/*
! * Change directory to "new_dir". If FEAT_SEARCHPATH is defined, search
! * 'cdpath' for relative directory names, otherwise just mch_chdir().
*/
int
vim_chdir(char_u *new_dir)
{
- #ifndef FEAT_SEARCHPATH
- return mch_chdir((char *)new_dir);
- #else
char_u *dir_name;
int r;
--- 2399,2410 ----
/*
! * Change directory to "new_dir". Search 'cdpath' for relative directory
! * names, otherwise just mch_chdir().
*/
int
vim_chdir(char_u *new_dir)
{
char_u *dir_name;
int r;
***************
*** 2418,2424 ****
r = mch_chdir((char *)dir_name);
vim_free(dir_name);
return r;
- #endif
}
/*
--- 2415,2420 ----
*** ../vim-9.0.0264/src/normal.c 2022-08-21 10:40:02.451903998 +0100
--- src/normal.c 2022-08-25 15:48:46.207755891 +0100
***************
*** 4049,4055 ****
}
}
- #ifdef FEAT_SEARCHPATH
/*
* Grab the file name under the cursor and edit it.
*/
--- 4049,4054 ----
***************
*** 4092,4098 ****
else
clearop(cap->oap);
}
- #endif
/*
* <End> command: to end of current line or last line.
--- 4091,4096 ----
***************
*** 4439,4450 ****
old_pos = curwin->w_cursor;
curwin->w_cursor.coladd = 0; // TODO: don't do this for an error.
- #ifdef FEAT_SEARCHPATH
// "[f" or "]f" : Edit file under the cursor (same as "gf")
if (cap->nchar == 'f')
nv_gotofile(cap);
else
- #endif
#ifdef FEAT_FIND_ID
// Find the occurrence(s) of the identifier or define under cursor
--- 4437,4446 ----
***************
*** 6079,6092 ****
invoke_edit(cap, FALSE, 'g', FALSE);
break;
- #ifdef FEAT_SEARCHPATH
// "gf": goto file, edit file under cursor
// "]f" and "[f": can also be used.
case 'f':
case 'F':
nv_gotofile(cap);
break;
- #endif
// "g'm" and "g`m": jump to mark without setting pcmark
case '\'':
--- 6075,6086 ----
*** ../vim-9.0.0264/src/option.c 2022-08-16 20:23:57.398232761 +0100
--- src/option.c 2022-08-25 15:49:08.459739197 +0100
***************
*** 220,226 ****
}
}
- #ifdef FEAT_SEARCHPATH
{
char_u *cdpath;
char_u *buf;
--- 220,225 ----
***************
*** 262,268 ****
vim_free(cdpath);
}
}
- #endif
#if defined(FEAT_POSTSCRIPT) && \
(defined(MSWIN) || defined(VMS) || defined(MAC) || defined(hpux))
--- 261,266 ----
***************
*** 5519,5527 ****
case PV_SI: return (char_u *)&(curbuf->b_p_si);
case PV_SN: return (char_u *)&(curbuf->b_p_sn);
case PV_STS: return (char_u *)&(curbuf->b_p_sts);
- #ifdef FEAT_SEARCHPATH
case PV_SUA: return (char_u *)&(curbuf->b_p_sua);
- #endif
case PV_SWF: return (char_u *)&(curbuf->b_p_swf);
#ifdef FEAT_SYN_HL
case PV_SMC: return (char_u *)&(curbuf->b_p_smc);
--- 5517,5523 ----
***************
*** 6080,6089 ****
buf->b_p_key = vim_strsave(p_key);
COPY_OPT_SCTX(buf, BV_KEY);
#endif
- #ifdef FEAT_SEARCHPATH
buf->b_p_sua = vim_strsave(p_sua);
COPY_OPT_SCTX(buf, BV_SUA);
- #endif
#ifdef FEAT_KEYMAP
buf->b_p_keymap = vim_strsave(p_keymap);
COPY_OPT_SCTX(buf, BV_KMAP);
--- 6076,6083 ----
***************
*** 6380,6399 ****
|| p == (char_u *)&p_path
|| p == (char_u *)&p_pp
|| p == (char_u *)&p_rtp
- #ifdef FEAT_SEARCHPATH
|| p == (char_u *)&p_cdpath
- #endif
#ifdef FEAT_SESSION
|| p == (char_u *)&p_vdir
#endif
)
{
xp->xp_context = EXPAND_DIRECTORIES;
! if (p == (char_u *)&p_path
! #ifdef FEAT_SEARCHPATH
! || p == (char_u *)&p_cdpath
! #endif
! )
xp->xp_backslash = XP_BS_THREE;
else
xp->xp_backslash = XP_BS_ONE;
--- 6374,6387 ----
|| p == (char_u *)&p_path
|| p == (char_u *)&p_pp
|| p == (char_u *)&p_rtp
|| p == (char_u *)&p_cdpath
#ifdef FEAT_SESSION
|| p == (char_u *)&p_vdir
#endif
)
{
xp->xp_context = EXPAND_DIRECTORIES;
! if (p == (char_u *)&p_path || p == (char_u *)&p_cdpath)
xp->xp_backslash = XP_BS_THREE;
else
xp->xp_backslash = XP_BS_ONE;
*** ../vim-9.0.0264/src/option.h 2022-08-16 20:23:57.402232730 +0100
--- src/option.h 2022-08-25 15:52:11.287598354 +0100
***************
*** 780,788 ****
#endif
EXTERN char_u *p_pm; // 'patchmode'
EXTERN char_u *p_path; // 'path'
- #ifdef FEAT_SEARCHPATH
EXTERN char_u *p_cdpath; // 'cdpath'
- #endif
#if defined(DYNAMIC_PERL)
EXTERN char_u *p_perldll; // 'perldll'
#endif
--- 780,786 ----
***************
*** 908,916 ****
EXTERN int p_sta; // 'smarttab'
EXTERN long p_sts; // 'softtabstop'
EXTERN int p_sb; // 'splitbelow'
- #if defined(FEAT_SEARCHPATH)
EXTERN char_u *p_sua; // 'suffixesadd'
- #endif
EXTERN int p_swf; // 'swapfile'
#ifdef FEAT_SYN_HL
EXTERN long p_smc; // 'synmaxcol'
--- 906,912 ----
***************
*** 1196,1204 ****
, BV_SPO
#endif
, BV_STS
- #ifdef FEAT_SEARCHPATH
, BV_SUA
- #endif
, BV_SW
, BV_SWF
#ifdef FEAT_EVAL
--- 1192,1198 ----
*** ../vim-9.0.0264/src/optiondefs.h 2022-08-16 20:23:57.402232730 +0100
--- src/optiondefs.h 2022-08-25 15:52:39.967575743 +0100
***************
*** 123,131 ****
# define PV_SPO OPT_BUF(BV_SPO)
#endif
#define PV_STS OPT_BUF(BV_STS)
! #ifdef FEAT_SEARCHPATH
! # define PV_SUA OPT_BUF(BV_SUA)
! #endif
#define PV_SW OPT_BUF(BV_SW)
#define PV_SWF OPT_BUF(BV_SWF)
#ifdef FEAT_EVAL
--- 123,129 ----
# define PV_SPO OPT_BUF(BV_SPO)
#endif
#define PV_STS OPT_BUF(BV_STS)
! #define PV_SUA OPT_BUF(BV_SUA)
#define PV_SW OPT_BUF(BV_SW)
#define PV_SWF OPT_BUF(BV_SWF)
#ifdef FEAT_EVAL
***************
*** 546,558 ****
{(char_u *)FALSE, (char_u *)0L}
SCTX_INIT},
{"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE|P_COMMA|P_NODUP,
- #ifdef FEAT_SEARCHPATH
(char_u *)&p_cdpath, PV_NONE,
{(char_u *)",,", (char_u *)0L}
- #else
- (char_u *)NULL, PV_NONE,
- {(char_u *)0L, (char_u *)0L}
- #endif
SCTX_INIT},
{"cedit", NULL, P_STRING,
#ifdef FEAT_CMDWIN
--- 544,551 ----
***************
*** 2380,2392 ****
{(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
(char_u *)0L} SCTX_INIT},
{"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_ONECOMMA|P_NODUP,
- #ifdef FEAT_SEARCHPATH
(char_u *)&p_sua, PV_SUA,
{(char_u *)"", (char_u *)0L}
- #else
- (char_u *)NULL, PV_NONE,
- {(char_u *)0L, (char_u *)0L}
- #endif
SCTX_INIT},
{"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT,
(char_u *)&p_swf, PV_SWF,
--- 2373,2380 ----
*** ../vim-9.0.0264/src/optionstr.c 2022-08-16 20:23:57.398232761 +0100
--- src/optionstr.c 2022-08-25 15:49:16.299733270 +0100
***************
*** 253,261 ****
check_string_option(&buf->b_s.b_p_spl);
check_string_option(&buf->b_s.b_p_spo);
#endif
- #ifdef FEAT_SEARCHPATH
check_string_option(&buf->b_p_sua);
- #endif
check_string_option(&buf->b_p_cink);
check_string_option(&buf->b_p_cino);
check_string_option(&buf->b_p_cinsd);
--- 253,259 ----
*** ../vim-9.0.0264/src/register.c 2022-08-14 14:16:07.999582175 +0100
--- src/register.c 2022-08-25 15:49:26.455725592 +0100
***************
*** 914,920 ****
emsg(_(e_no_inserted_text_yet));
return TRUE;
- #ifdef FEAT_SEARCHPATH
case Ctrl_F: // Filename under cursor
case Ctrl_P: // Path under cursor, expand via "path"
if (!errmsg)
--- 914,919 ----
***************
*** 923,929 ****
| (regname == Ctrl_P ? FNAME_EXP : 0), 1L, NULL);
*allocated = TRUE;
return TRUE;
- #endif
case Ctrl_W: // word under cursor
case Ctrl_A: // WORD (mnemonic All) under cursor
--- 922,927 ----
***************
*** 2586,2595 ****
case ':': // last command line
case '/': // last search-pattern
case '.': // last inserted text
- # ifdef FEAT_SEARCHPATH
case Ctrl_F: // Filename under cursor
case Ctrl_P: // Path under cursor, expand via "path"
- # endif
case Ctrl_W: // word under cursor
case Ctrl_A: // WORD (mnemonic All) under cursor
case '_': // black hole: always empty
--- 2584,2591 ----
*** ../vim-9.0.0264/src/structs.h 2022-08-24 16:30:30.686752454 +0100
--- src/structs.h 2022-08-25 15:52:46.999570179 +0100
***************
*** 2973,2981 ****
int b_p_si; // 'smartindent'
long b_p_sts; // 'softtabstop'
long b_p_sts_nopaste; // b_p_sts saved for paste mode
- #ifdef FEAT_SEARCHPATH
char_u *b_p_sua; // 'suffixesadd'
- #endif
int b_p_swf; // 'swapfile'
#ifdef FEAT_SYN_HL
long b_p_smc; // 'synmaxcol'
--- 2973,2979 ----
*** ../vim-9.0.0264/src/version.c 2022-08-25 15:21:18.127753974 +0100
--- src/version.c 2022-08-25 15:58:03.505114419 +0100
***************
*** 246,256 ****
"-extra_search",
#endif
"-farsi",
- #ifdef FEAT_SEARCHPATH
"+file_in_path",
- #else
- "-file_in_path",
- #endif
#ifdef FEAT_FIND_ID
"+find_in_path",
#else
--- 246,252 ----
*** ../vim-9.0.0264/src/window.c 2022-08-25 15:11:11.400084545 +0100
--- src/window.c 2022-08-25 15:50:04.571696594 +0100
***************
*** 136,145 ****
{
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;
--- 136,143 ----
***************
*** 521,527 ****
do_nv_ident(Ctrl_RSB, NUL);
break;
- #ifdef FEAT_SEARCHPATH
// edit file name under cursor in a new window
case 'f':
case 'F':
--- 519,524 ----
***************
*** 534,542 ****
{
tabpage_T *oldtab = curtab;
win_T *oldwin = curwin;
! # ifdef FEAT_GUI
need_mouse_correct = TRUE;
! # endif
setpcmark();
if (win_split(0, 0) == OK)
{
--- 531,539 ----
{
tabpage_T *oldtab = curtab;
win_T *oldwin = curwin;
! #ifdef FEAT_GUI
need_mouse_correct = TRUE;
! #endif
setpcmark();
if (win_split(0, 0) == OK)
{
***************
*** 559,565 ****
vim_free(ptr);
}
break;
- #endif
#ifdef FEAT_FIND_ID
// Go to the first occurrence of the identifier under cursor along path in a
--- 556,561 ----
***************
*** 637,649 ****
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;
--- 633,644 ----
do_nv_ident('g', xchar);
break;
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;
!
case 't': // CTRL-W gt: go to next tab page
goto_tabpage((int)Prenum);
break;
***************
*** 713,723 ****
#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:
--- 708,716 ----
*** ../vim-9.0.0264/src/testdir/test_options.vim 2022-08-14 14:49:46.351601248 +0100
--- src/testdir/test_options.vim 2022-08-25 15:57:04.464889050 +0100
***************
*** 949,955 ****
" Test for the default CDPATH option
func Test_opt_default_cdpath()
- CheckFeature file_in_path
let after =<< trim [CODE]
call assert_equal(',/path/to/dir1,/path/to/dir2', &cdpath)
call writefile(v:errors, 'Xtestout')
--- 949,954 ----
*** ../vim-9.0.0264/src/version.c 2022-08-25 15:21:18.127753974 +0100
--- src/version.c 2022-08-25 15:58:03.505114419 +0100
***************
*** 733,734 ****
--- 729,732 ----
{ /* Add new patch number below this line */
+ /**/
+ 265,
/**/
--
Every exit is an entrance into something else.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///