mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -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:
parent
b213703f35
commit
f80f40a55c
@ -2736,8 +2736,6 @@ finddir({name} [, {path} [, {count}]]) *finddir()*
|
|||||||
Returns an empty string if the directory is not found.
|
Returns an empty string if the directory is not found.
|
||||||
|
|
||||||
This is quite similar to the ex-command `:find`.
|
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|: >
|
Can also be used as a |method|: >
|
||||||
GetName()->finddir()
|
GetName()->finddir()
|
||||||
@ -10532,7 +10530,8 @@ ex_extra |+ex_extra| (always true)
|
|||||||
extra_search Compiled with support for |'incsearch'| and
|
extra_search Compiled with support for |'incsearch'| and
|
||||||
|'hlsearch'|
|
|'hlsearch'|
|
||||||
farsi Support for Farsi was removed |farsi|.
|
farsi Support for Farsi was removed |farsi|.
|
||||||
file_in_path Compiled with support for |gf| and |<cfile>|
|
file_in_path Compiled with support for |gf| and |<cfile>| (always
|
||||||
|
true)
|
||||||
filterpipe When 'shelltemp' is off pipes are used for shell
|
filterpipe When 'shelltemp' is off pipes are used for shell
|
||||||
read/write/filter commands
|
read/write/filter commands
|
||||||
find_in_path Compiled with support for include file searches
|
find_in_path Compiled with support for include file searches
|
||||||
|
@ -199,9 +199,6 @@ CTRL-R CTRL-L *c_CTRL-R_CTRL-L* *c_<C-R>_<C-L>*
|
|||||||
currently displayed match is used. With CTRL-W the part of
|
currently displayed match is used. With CTRL-W the part of
|
||||||
the word that was already typed is not inserted again.
|
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-R* *c_<C-R>_<C-R>*
|
||||||
*c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>*
|
*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}
|
CTRL-R CTRL-R {register CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L}
|
||||||
|
@ -247,8 +247,6 @@ If you want to keep the changed buffer without saving it, switch on the
|
|||||||
*:fin* *:find*
|
*:fin* *:find*
|
||||||
:fin[d][!] [++opt] [+cmd] {file}
|
:fin[d][!] [++opt] [+cmd] {file}
|
||||||
Find {file} in 'path' and then |:edit| it.
|
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}
|
:{count}fin[d][!] [++opt] [+cmd] {file}
|
||||||
Just like ":find", but use the {count} match in
|
Just like ":find", but use the {count} match in
|
||||||
@ -322,8 +320,6 @@ CTRL-^ Edit the alternate file. Mostly the alternate file is
|
|||||||
For Unix the '~' character is expanded, like in
|
For Unix the '~' character is expanded, like in
|
||||||
"~user/file". Environment variables are expanded too
|
"~user/file". Environment variables are expanded too
|
||||||
|expand-env|.
|
|expand-env|.
|
||||||
{not available when the |+file_in_path| feature was
|
|
||||||
disabled at compile time}
|
|
||||||
|
|
||||||
*v_gf*
|
*v_gf*
|
||||||
{Visual}[count]gf Same as "gf", but the highlighted text is used as the
|
{Visual}[count]gf Same as "gf", but the highlighted text is used as the
|
||||||
|
@ -1559,8 +1559,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
*'cdpath'* *'cd'* *E344* *E346*
|
*'cdpath'* *'cd'* *E344* *E346*
|
||||||
'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,")
|
'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,")
|
||||||
global
|
global
|
||||||
{not available when compiled without the
|
|
||||||
|+file_in_path| feature}
|
|
||||||
This is a list of directories which will be searched when using the
|
This is a list of directories which will be searched when using the
|
||||||
|:cd|, |:tcd| and |:lcd| commands, provided that the directory being
|
|:cd|, |:tcd| and |:lcd| commands, provided that the directory being
|
||||||
searched for has a relative path, not an absolute part starting with
|
searched for has a relative path, not an absolute part starting with
|
||||||
@ -7726,8 +7724,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
*'suffixesadd'* *'sua'*
|
*'suffixesadd'* *'sua'*
|
||||||
'suffixesadd' 'sua' string (default "")
|
'suffixesadd' 'sua' string (default "")
|
||||||
local to buffer
|
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
|
Comma-separated list of suffixes, which are used when searching for a
|
||||||
file for the "gf", "[I", etc. commands. Example: >
|
file for the "gf", "[I", etc. commands. Example: >
|
||||||
:set suffixesadd=.java
|
:set suffixesadd=.java
|
||||||
|
@ -81,8 +81,6 @@ For the related autocommands see |tabnew-autocmd|.
|
|||||||
:[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
|
:[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
|
||||||
Open a new tab page and edit {file} in 'path', like with
|
Open a new tab page and edit {file} in 'path', like with
|
||||||
|:find|. For [count] see |:tabnew| above.
|
|:find|. For [count] see |:tabnew| above.
|
||||||
{not available when the |+file_in_path| feature was disabled
|
|
||||||
at compile time}
|
|
||||||
|
|
||||||
:[count]tab {cmd} *:tab*
|
:[count]tab {cmd} *:tab*
|
||||||
Execute {cmd} and when it opens a new window open a new tab
|
Execute {cmd} and when it opens a new window open a new tab
|
||||||
|
@ -843,30 +843,22 @@ CTRL-W CTRL-F Split current window in two. Edit file name under cursor.
|
|||||||
If the name is a hypertext link that looks like
|
If the name is a hypertext link that looks like
|
||||||
"type://machine/path", only "/path" is used.
|
"type://machine/path", only "/path" is used.
|
||||||
If a count is given, the count'th matching file is edited.
|
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*
|
CTRL-W F *CTRL-W_F*
|
||||||
Split current window in two. Edit file name under cursor and
|
Split current window in two. Edit file name under cursor and
|
||||||
jump to the line number following the file name. See |gF| for
|
jump to the line number following the file name. See |gF| for
|
||||||
details on how the line number is obtained.
|
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*
|
CTRL-W gf *CTRL-W_gf*
|
||||||
Open a new tab page and edit the file name under the cursor.
|
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
|
Like "tab split" and "gf", but the new tab page isn't created
|
||||||
if the file does not exist.
|
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*
|
CTRL-W gF *CTRL-W_gF*
|
||||||
Open a new tab page and edit the file name under the cursor
|
Open a new tab page and edit the file name under the cursor
|
||||||
and jump to the line number following the file name. Like
|
and jump to the line number following the file name. Like
|
||||||
"tab split" and "gF", but the new tab page isn't created if
|
"tab split" and "gF", but the new tab page isn't created if
|
||||||
the file does not exist.
|
the file does not exist.
|
||||||
{not available when the |+file_in_path| feature was disabled
|
|
||||||
at compile time}
|
|
||||||
|
|
||||||
CTRL-W gt *CTRL-W_gt*
|
CTRL-W gt *CTRL-W_gt*
|
||||||
Go to next tab page, same as `gt`.
|
Go to next tab page, same as `gt`.
|
||||||
|
@ -158,10 +158,10 @@ alloc(size_t size)
|
|||||||
void *
|
void *
|
||||||
alloc_id(size_t size, alloc_id_T id UNUSED)
|
alloc_id(size_t size, alloc_id_T id UNUSED)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_EVAL
|
# ifdef FEAT_EVAL
|
||||||
if (alloc_fail_id == id && alloc_does_fail(size))
|
if (alloc_fail_id == id && alloc_does_fail(size))
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
# endif
|
||||||
return lalloc(size, TRUE);
|
return lalloc(size, TRUE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -425,9 +425,7 @@ free_all_mem(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free_titles();
|
free_titles();
|
||||||
# if defined(FEAT_SEARCHPATH)
|
|
||||||
free_findfile();
|
free_findfile();
|
||||||
# endif
|
|
||||||
|
|
||||||
// Obviously named calls.
|
// Obviously named calls.
|
||||||
free_all_autocmds();
|
free_all_autocmds();
|
||||||
|
@ -2324,9 +2324,7 @@ free_buf_options(
|
|||||||
clear_string_option(&buf->b_s.b_p_spl);
|
clear_string_option(&buf->b_s.b_p_spl);
|
||||||
clear_string_option(&buf->b_s.b_p_spo);
|
clear_string_option(&buf->b_s.b_p_spo);
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
clear_string_option(&buf->b_p_sua);
|
clear_string_option(&buf->b_p_sua);
|
||||||
#endif
|
|
||||||
clear_string_option(&buf->b_p_ft);
|
clear_string_option(&buf->b_p_ft);
|
||||||
clear_string_option(&buf->b_p_cink);
|
clear_string_option(&buf->b_p_cink);
|
||||||
clear_string_option(&buf->b_p_cino);
|
clear_string_option(&buf->b_p_cino);
|
||||||
|
@ -853,7 +853,6 @@ EXTERN char e_out_of_memory_allocating_nr_bytes[]
|
|||||||
EXTERN char e_invalid_path_number_must_be_at_end_of_path_or_be_followed_by_str[]
|
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'."));
|
INIT(= N_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."));
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
EXTERN char e_cant_find_directory_str_in_cdpath[]
|
EXTERN char e_cant_find_directory_str_in_cdpath[]
|
||||||
INIT(= N_("E344: Can't find directory \"%s\" in cdpath"));
|
INIT(= N_("E344: Can't find directory \"%s\" in cdpath"));
|
||||||
EXTERN char e_cant_find_file_str_in_path[]
|
EXTERN char e_cant_find_file_str_in_path[]
|
||||||
@ -862,7 +861,6 @@ EXTERN char e_no_more_directory_str_found_in_cdpath[]
|
|||||||
INIT(= N_("E346: No more directory \"%s\" found in cdpath"));
|
INIT(= N_("E346: No more directory \"%s\" found in cdpath"));
|
||||||
EXTERN char e_no_more_file_str_found_in_path[]
|
EXTERN char e_no_more_file_str_found_in_path[]
|
||||||
INIT(= N_("E347: No more file \"%s\" found in path"));
|
INIT(= N_("E347: No more file \"%s\" found in path"));
|
||||||
#endif
|
|
||||||
EXTERN char e_no_string_under_cursor[]
|
EXTERN char e_no_string_under_cursor[]
|
||||||
INIT(= N_("E348: No string under cursor"));
|
INIT(= N_("E348: No string under cursor"));
|
||||||
EXTERN char e_no_identifier_under_cursor[]
|
EXTERN char e_no_identifier_under_cursor[]
|
||||||
@ -1090,12 +1088,10 @@ EXTERN char e_cannot_close_last_window[]
|
|||||||
INIT(= N_("E444: Cannot close last window"));
|
INIT(= N_("E444: Cannot close last window"));
|
||||||
EXTERN char e_other_window_contains_changes[]
|
EXTERN char e_other_window_contains_changes[]
|
||||||
INIT(= N_("E445: Other window contains changes"));
|
INIT(= N_("E445: Other window contains changes"));
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
EXTERN char e_no_file_name_under_cursor[]
|
EXTERN char e_no_file_name_under_cursor[]
|
||||||
INIT(= N_("E446: No file name under cursor"));
|
INIT(= N_("E446: No file name under cursor"));
|
||||||
EXTERN char e_cant_find_file_str_in_path_2[]
|
EXTERN char e_cant_find_file_str_in_path_2[]
|
||||||
INIT(= N_("E447: Can't find file \"%s\" in path"));
|
INIT(= N_("E447: Can't find file \"%s\" in path"));
|
||||||
#endif
|
|
||||||
#ifdef USING_LOAD_LIBRARY
|
#ifdef USING_LOAD_LIBRARY
|
||||||
EXTERN char e_could_not_load_library_function_str[]
|
EXTERN char e_could_not_load_library_function_str[]
|
||||||
INIT(= N_("E448: Could not load library function %s"));
|
INIT(= N_("E448: Could not load library function %s"));
|
||||||
|
@ -5646,13 +5646,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
|||||||
0
|
0
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
{"file_in_path",
|
{"file_in_path", 1},
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
1
|
|
||||||
#else
|
|
||||||
0
|
|
||||||
#endif
|
|
||||||
},
|
|
||||||
{"filterpipe",
|
{"filterpipe",
|
||||||
#if defined(FEAT_FILTERPIPE) && !defined(VIMDLL)
|
#if defined(FEAT_FILTERPIPE) && !defined(VIMDLL)
|
||||||
1
|
1
|
||||||
|
@ -6678,9 +6678,7 @@ ex_wrongmodifier(exarg_T *eap)
|
|||||||
ex_splitview(exarg_T *eap)
|
ex_splitview(exarg_T *eap)
|
||||||
{
|
{
|
||||||
win_T *old_curwin = curwin;
|
win_T *old_curwin = curwin;
|
||||||
#if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
|
|
||||||
char_u *fname = NULL;
|
char_u *fname = NULL;
|
||||||
#endif
|
|
||||||
#ifdef FEAT_BROWSE
|
#ifdef FEAT_BROWSE
|
||||||
char_u dot_path[] = ".";
|
char_u dot_path[] = ".";
|
||||||
int save_cmod_flags = cmdmod.cmod_flags;
|
int save_cmod_flags = cmdmod.cmod_flags;
|
||||||
@ -6708,7 +6706,6 @@ ex_splitview(exarg_T *eap)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
if (eap->cmdidx == CMD_sfind || eap->cmdidx == CMD_tabfind)
|
if (eap->cmdidx == CMD_sfind || eap->cmdidx == CMD_tabfind)
|
||||||
{
|
{
|
||||||
fname = find_file_in_path(eap->arg, (int)STRLEN(eap->arg),
|
fname = find_file_in_path(eap->arg, (int)STRLEN(eap->arg),
|
||||||
@ -6718,11 +6715,7 @@ ex_splitview(exarg_T *eap)
|
|||||||
eap->arg = fname;
|
eap->arg = fname;
|
||||||
}
|
}
|
||||||
# ifdef FEAT_BROWSE
|
# ifdef FEAT_BROWSE
|
||||||
else
|
else if ((cmdmod.cmod_flags & CMOD_BROWSE)
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#ifdef FEAT_BROWSE
|
|
||||||
if ((cmdmod.cmod_flags & CMOD_BROWSE)
|
|
||||||
&& eap->cmdidx != CMD_vnew
|
&& eap->cmdidx != CMD_vnew
|
||||||
&& eap->cmdidx != CMD_new)
|
&& eap->cmdidx != CMD_new)
|
||||||
{
|
{
|
||||||
@ -6786,10 +6779,8 @@ ex_splitview(exarg_T *eap)
|
|||||||
cmdmod.cmod_flags = save_cmod_flags;
|
cmdmod.cmod_flags = save_cmod_flags;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
|
|
||||||
theend:
|
theend:
|
||||||
vim_free(fname);
|
vim_free(fname);
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -6980,7 +6971,6 @@ ex_resize(exarg_T *eap)
|
|||||||
static void
|
static void
|
||||||
ex_find(exarg_T *eap)
|
ex_find(exarg_T *eap)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
char_u *fname;
|
char_u *fname;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
@ -7002,12 +6992,9 @@ ex_find(exarg_T *eap)
|
|||||||
if (fname != NULL)
|
if (fname != NULL)
|
||||||
{
|
{
|
||||||
eap->arg = fname;
|
eap->arg = fname;
|
||||||
#endif
|
|
||||||
do_exedit(eap, NULL);
|
do_exedit(eap, NULL);
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
vim_free(fname);
|
vim_free(fname);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -9273,7 +9260,6 @@ eval_vars(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
case SPEC_CFILE: // file name under cursor
|
case SPEC_CFILE: // file name under cursor
|
||||||
result = file_name_at_cursor(FNAME_MESS|FNAME_HYP, 1L, NULL);
|
result = file_name_at_cursor(FNAME_MESS|FNAME_HYP, 1L, NULL);
|
||||||
if (result == NULL)
|
if (result == NULL)
|
||||||
@ -9283,7 +9269,6 @@ eval_vars(
|
|||||||
}
|
}
|
||||||
resultbuf = result; // remember allocated string
|
resultbuf = result; // remember allocated string
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
case SPEC_AFILE: // file name for autocommand
|
case SPEC_AFILE: // file name for autocommand
|
||||||
result = autocmd_fname;
|
result = autocmd_fname;
|
||||||
|
@ -97,6 +97,7 @@
|
|||||||
* These features used to be optional but are now always enabled:
|
* These features used to be optional but are now always enabled:
|
||||||
* +windows Multiple windows. Without this there is no help
|
* +windows Multiple windows. Without this there is no help
|
||||||
* window and no status lines.
|
* window and no status lines.
|
||||||
|
* +autocmd Automatic commands
|
||||||
* +vertsplit Vertically split windows.
|
* +vertsplit Vertically split windows.
|
||||||
* +cmdhist Command line history.
|
* +cmdhist Command line history.
|
||||||
* +localmap Mappings and abbreviations local to a buffer.
|
* +localmap Mappings and abbreviations local to a buffer.
|
||||||
@ -115,6 +116,7 @@
|
|||||||
* +cindent C code indenting (From Eric Fischer).
|
* +cindent C code indenting (From Eric Fischer).
|
||||||
* +smartindent smart C code indenting when the 'si' option is set.
|
* +smartindent smart C code indenting when the 'si' option is set.
|
||||||
* +textobjects Text objects: "vaw", "das", etc.
|
* +textobjects Text objects: "vaw", "das", etc.
|
||||||
|
* +file_in_path "gf" and "<cfile>" commands.
|
||||||
*
|
*
|
||||||
* Obsolete:
|
* Obsolete:
|
||||||
* +tag_old_static Old style static tags: "file:tag file ..".
|
* +tag_old_static Old style static tags: "file:tag file ..".
|
||||||
@ -201,20 +203,11 @@
|
|||||||
# define FEAT_QUICKFIX
|
# define FEAT_QUICKFIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* +file_in_path "gf" and "<cfile>" commands.
|
|
||||||
*/
|
|
||||||
#ifdef FEAT_NORMAL
|
|
||||||
# define FEAT_SEARCHPATH
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
|
* +find_in_path "[I" ":isearch" "^W^I", ":checkpath", etc.
|
||||||
*/
|
*/
|
||||||
#ifdef FEAT_NORMAL
|
#ifdef FEAT_NORMAL
|
||||||
# ifdef FEAT_SEARCHPATH // FEAT_SEARCHPATH is required
|
# define FEAT_FIND_ID
|
||||||
# define FEAT_FIND_ID
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -324,7 +317,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* +diff Displaying diffs in a nice way.
|
* +diff Displaying diffs in a nice way.
|
||||||
* Requires +windows and +autocmd.
|
|
||||||
* Can be enabled in autoconf already.
|
* Can be enabled in autoconf already.
|
||||||
*/
|
*/
|
||||||
#if defined(FEAT_NORMAL) && !defined(FEAT_DIFF)
|
#if defined(FEAT_NORMAL) && !defined(FEAT_DIFF)
|
||||||
@ -380,14 +372,14 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* +syntax syntax highlighting. When using this, it's a good
|
* +syntax syntax highlighting. When using this, it's a good
|
||||||
* idea to have +autocmd and +eval too.
|
* idea to have +eval too.
|
||||||
*/
|
*/
|
||||||
#if defined(FEAT_NORMAL) || defined(PROTO)
|
#if defined(FEAT_NORMAL) || defined(PROTO)
|
||||||
# define FEAT_SYN_HL
|
# define FEAT_SYN_HL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* +conceal 'conceal' option. Needs syntax highlighting
|
* +conceal 'conceal' option. Depends on syntax highlighting
|
||||||
* as this is how the concealed text is defined.
|
* as this is how the concealed text is defined.
|
||||||
*/
|
*/
|
||||||
#if defined(FEAT_BIG) && defined(FEAT_SYN_HL)
|
#if defined(FEAT_BIG) && defined(FEAT_SYN_HL)
|
||||||
|
@ -942,7 +942,6 @@ findfilendir(
|
|||||||
typval_T *rettv,
|
typval_T *rettv,
|
||||||
int find_what UNUSED)
|
int find_what UNUSED)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
char_u *fname;
|
char_u *fname;
|
||||||
char_u *fresult = NULL;
|
char_u *fresult = NULL;
|
||||||
char_u *path = *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path;
|
char_u *path = *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path;
|
||||||
@ -951,7 +950,6 @@ findfilendir(
|
|||||||
int count = 1;
|
int count = 1;
|
||||||
int first = TRUE;
|
int first = TRUE;
|
||||||
int error = FALSE;
|
int error = FALSE;
|
||||||
#endif
|
|
||||||
|
|
||||||
rettv->vval.v_string = NULL;
|
rettv->vval.v_string = NULL;
|
||||||
rettv->v_type = VAR_STRING;
|
rettv->v_type = VAR_STRING;
|
||||||
@ -962,7 +960,6 @@ findfilendir(
|
|||||||
&& check_for_opt_number_arg(argvars, 2) == FAIL)))
|
&& check_for_opt_number_arg(argvars, 2) == FAIL)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
fname = tv_get_string(&argvars[0]);
|
fname = tv_get_string(&argvars[0]);
|
||||||
|
|
||||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||||
@ -1006,7 +1003,6 @@ findfilendir(
|
|||||||
|
|
||||||
if (rettv->v_type == VAR_STRING)
|
if (rettv->v_type == VAR_STRING)
|
||||||
rettv->vval.v_string = fresult;
|
rettv->vval.v_string = fresult;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3879,9 +3875,7 @@ gen_expand_wildcards(
|
|||||||
static int recursive = FALSE;
|
static int recursive = FALSE;
|
||||||
int add_pat;
|
int add_pat;
|
||||||
int retval = OK;
|
int retval = OK;
|
||||||
#if defined(FEAT_SEARCHPATH)
|
|
||||||
int did_expand_in_path = FALSE;
|
int did_expand_in_path = FALSE;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* expand_env() is called to expand things like "~user". If this fails,
|
* expand_env() is called to expand things like "~user". If this fails,
|
||||||
@ -3971,7 +3965,6 @@ gen_expand_wildcards(
|
|||||||
*/
|
*/
|
||||||
if (mch_has_exp_wildcard(p) || (flags & EW_ICASE))
|
if (mch_has_exp_wildcard(p) || (flags & EW_ICASE))
|
||||||
{
|
{
|
||||||
#if defined(FEAT_SEARCHPATH)
|
|
||||||
if ((flags & EW_PATH)
|
if ((flags & EW_PATH)
|
||||||
&& !mch_isFullName(p)
|
&& !mch_isFullName(p)
|
||||||
&& !(p[0] == '.'
|
&& !(p[0] == '.'
|
||||||
@ -3987,7 +3980,6 @@ gen_expand_wildcards(
|
|||||||
did_expand_in_path = TRUE;
|
did_expand_in_path = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
add_pat = mch_expandpath(&ga, p, flags);
|
add_pat = mch_expandpath(&ga, p, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4007,10 +3999,8 @@ gen_expand_wildcards(
|
|||||||
vim_free(t);
|
vim_free(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(FEAT_SEARCHPATH)
|
|
||||||
if (did_expand_in_path && ga.ga_len > 0 && (flags & EW_PATH))
|
if (did_expand_in_path && ga.ga_len > 0 && (flags & EW_PATH))
|
||||||
uniquefy_paths(&ga, p);
|
uniquefy_paths(&ga, p);
|
||||||
#endif
|
|
||||||
if (p != pat[i])
|
if (p != pat[i])
|
||||||
vim_free(p);
|
vim_free(p);
|
||||||
}
|
}
|
||||||
|
@ -709,14 +709,10 @@ vim_findfile(void *search_ctx_arg)
|
|||||||
char_u *path_end = NULL;
|
char_u *path_end = NULL;
|
||||||
#endif
|
#endif
|
||||||
ff_stack_T *stackp;
|
ff_stack_T *stackp;
|
||||||
#if defined(FEAT_SEARCHPATH) || defined(FEAT_PATH_EXTRA)
|
|
||||||
int len;
|
int len;
|
||||||
#endif
|
|
||||||
int i;
|
int i;
|
||||||
char_u *p;
|
char_u *p;
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
char_u *suf;
|
char_u *suf;
|
||||||
#endif
|
|
||||||
ff_search_ctx_T *search_ctx;
|
ff_search_ctx_T *search_ctx;
|
||||||
|
|
||||||
if (search_ctx_arg == NULL)
|
if (search_ctx_arg == NULL)
|
||||||
@ -995,14 +991,12 @@ vim_findfile(void *search_ctx_arg)
|
|||||||
* Try without extra suffix and then with suffixes
|
* Try without extra suffix and then with suffixes
|
||||||
* from 'suffixesadd'.
|
* from 'suffixesadd'.
|
||||||
*/
|
*/
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
len = (int)STRLEN(file_path);
|
len = (int)STRLEN(file_path);
|
||||||
if (search_ctx->ffsc_tagfile)
|
if (search_ctx->ffsc_tagfile)
|
||||||
suf = (char_u *)"";
|
suf = (char_u *)"";
|
||||||
else
|
else
|
||||||
suf = curbuf->b_p_sua;
|
suf = curbuf->b_p_sua;
|
||||||
for (;;)
|
for (;;)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// if file exists and we didn't already find it
|
// if file exists and we didn't already find it
|
||||||
if ((path_with_url(file_path)
|
if ((path_with_url(file_path)
|
||||||
@ -1072,13 +1066,11 @@ vim_findfile(void *search_ctx_arg)
|
|||||||
return file_path;
|
return file_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
// Not found or found already, try next suffix.
|
// Not found or found already, try next suffix.
|
||||||
if (*suf == NUL)
|
if (*suf == NUL)
|
||||||
break;
|
break;
|
||||||
copy_option_part(&suf, file_path + len,
|
copy_option_part(&suf, file_path + len,
|
||||||
MAXPATHL - len, ",");
|
MAXPATHL - len, ",");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1633,7 +1625,6 @@ ff_path_in_stoplist(char_u *path, int path_len, char_u **stopdirs_v)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(FEAT_SEARCHPATH) || defined(PROTO)
|
|
||||||
/*
|
/*
|
||||||
* Find the file name "ptr[len]" in the path. Also finds directory names.
|
* Find the file name "ptr[len]" in the path. Also finds directory names.
|
||||||
*
|
*
|
||||||
@ -2636,7 +2627,6 @@ expand_in_path(
|
|||||||
return gap->ga_len;
|
return gap->ga_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FEAT_SEARCHPATH
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Converts a file name into a canonical form. It simplifies a file name into
|
* Converts a file name into a canonical form. It simplifies a file name into
|
||||||
|
@ -2399,15 +2399,12 @@ update_mouseshape(int shape_idx)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Change directory to "new_dir". If FEAT_SEARCHPATH is defined, search
|
* Change directory to "new_dir". Search 'cdpath' for relative directory
|
||||||
* 'cdpath' for relative directory names, otherwise just mch_chdir().
|
* names, otherwise just mch_chdir().
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
vim_chdir(char_u *new_dir)
|
vim_chdir(char_u *new_dir)
|
||||||
{
|
{
|
||||||
#ifndef FEAT_SEARCHPATH
|
|
||||||
return mch_chdir((char *)new_dir);
|
|
||||||
#else
|
|
||||||
char_u *dir_name;
|
char_u *dir_name;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
@ -2418,7 +2415,6 @@ vim_chdir(char_u *new_dir)
|
|||||||
r = mch_chdir((char *)dir_name);
|
r = mch_chdir((char *)dir_name);
|
||||||
vim_free(dir_name);
|
vim_free(dir_name);
|
||||||
return r;
|
return r;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4049,7 +4049,6 @@ nv_down(cmdarg_T *cap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
/*
|
/*
|
||||||
* Grab the file name under the cursor and edit it.
|
* Grab the file name under the cursor and edit it.
|
||||||
*/
|
*/
|
||||||
@ -4092,7 +4091,6 @@ nv_gotofile(cmdarg_T *cap)
|
|||||||
else
|
else
|
||||||
clearop(cap->oap);
|
clearop(cap->oap);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <End> command: to end of current line or last line.
|
* <End> command: to end of current line or last line.
|
||||||
@ -4439,12 +4437,10 @@ nv_brackets(cmdarg_T *cap)
|
|||||||
old_pos = curwin->w_cursor;
|
old_pos = curwin->w_cursor;
|
||||||
curwin->w_cursor.coladd = 0; // TODO: don't do this for an error.
|
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")
|
// "[f" or "]f" : Edit file under the cursor (same as "gf")
|
||||||
if (cap->nchar == 'f')
|
if (cap->nchar == 'f')
|
||||||
nv_gotofile(cap);
|
nv_gotofile(cap);
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FEAT_FIND_ID
|
#ifdef FEAT_FIND_ID
|
||||||
// Find the occurrence(s) of the identifier or define under cursor
|
// Find the occurrence(s) of the identifier or define under cursor
|
||||||
@ -6079,14 +6075,12 @@ nv_g_cmd(cmdarg_T *cap)
|
|||||||
invoke_edit(cap, FALSE, 'g', FALSE);
|
invoke_edit(cap, FALSE, 'g', FALSE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
// "gf": goto file, edit file under cursor
|
// "gf": goto file, edit file under cursor
|
||||||
// "]f" and "[f": can also be used.
|
// "]f" and "[f": can also be used.
|
||||||
case 'f':
|
case 'f':
|
||||||
case 'F':
|
case 'F':
|
||||||
nv_gotofile(cap);
|
nv_gotofile(cap);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
// "g'm" and "g`m": jump to mark without setting pcmark
|
// "g'm" and "g`m": jump to mark without setting pcmark
|
||||||
case '\'':
|
case '\'':
|
||||||
|
14
src/option.c
14
src/option.c
@ -220,7 +220,6 @@ set_init_1(int clean_arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
{
|
{
|
||||||
char_u *cdpath;
|
char_u *cdpath;
|
||||||
char_u *buf;
|
char_u *buf;
|
||||||
@ -262,7 +261,6 @@ set_init_1(int clean_arg)
|
|||||||
vim_free(cdpath);
|
vim_free(cdpath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(FEAT_POSTSCRIPT) && \
|
#if defined(FEAT_POSTSCRIPT) && \
|
||||||
(defined(MSWIN) || defined(VMS) || defined(MAC) || defined(hpux))
|
(defined(MSWIN) || defined(VMS) || defined(MAC) || defined(hpux))
|
||||||
@ -5519,9 +5517,7 @@ get_varp(struct vimoption *p)
|
|||||||
case PV_SI: return (char_u *)&(curbuf->b_p_si);
|
case PV_SI: return (char_u *)&(curbuf->b_p_si);
|
||||||
case PV_SN: return (char_u *)&(curbuf->b_p_sn);
|
case PV_SN: return (char_u *)&(curbuf->b_p_sn);
|
||||||
case PV_STS: return (char_u *)&(curbuf->b_p_sts);
|
case PV_STS: return (char_u *)&(curbuf->b_p_sts);
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
case PV_SUA: return (char_u *)&(curbuf->b_p_sua);
|
case PV_SUA: return (char_u *)&(curbuf->b_p_sua);
|
||||||
#endif
|
|
||||||
case PV_SWF: return (char_u *)&(curbuf->b_p_swf);
|
case PV_SWF: return (char_u *)&(curbuf->b_p_swf);
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
case PV_SMC: return (char_u *)&(curbuf->b_p_smc);
|
case PV_SMC: return (char_u *)&(curbuf->b_p_smc);
|
||||||
@ -6080,10 +6076,8 @@ buf_copy_options(buf_T *buf, int flags)
|
|||||||
buf->b_p_key = vim_strsave(p_key);
|
buf->b_p_key = vim_strsave(p_key);
|
||||||
COPY_OPT_SCTX(buf, BV_KEY);
|
COPY_OPT_SCTX(buf, BV_KEY);
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
buf->b_p_sua = vim_strsave(p_sua);
|
buf->b_p_sua = vim_strsave(p_sua);
|
||||||
COPY_OPT_SCTX(buf, BV_SUA);
|
COPY_OPT_SCTX(buf, BV_SUA);
|
||||||
#endif
|
|
||||||
#ifdef FEAT_KEYMAP
|
#ifdef FEAT_KEYMAP
|
||||||
buf->b_p_keymap = vim_strsave(p_keymap);
|
buf->b_p_keymap = vim_strsave(p_keymap);
|
||||||
COPY_OPT_SCTX(buf, BV_KMAP);
|
COPY_OPT_SCTX(buf, BV_KMAP);
|
||||||
@ -6380,20 +6374,14 @@ set_context_in_set_cmd(
|
|||||||
|| p == (char_u *)&p_path
|
|| p == (char_u *)&p_path
|
||||||
|| p == (char_u *)&p_pp
|
|| p == (char_u *)&p_pp
|
||||||
|| p == (char_u *)&p_rtp
|
|| p == (char_u *)&p_rtp
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
|| p == (char_u *)&p_cdpath
|
|| p == (char_u *)&p_cdpath
|
||||||
#endif
|
|
||||||
#ifdef FEAT_SESSION
|
#ifdef FEAT_SESSION
|
||||||
|| p == (char_u *)&p_vdir
|
|| p == (char_u *)&p_vdir
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
xp->xp_context = EXPAND_DIRECTORIES;
|
xp->xp_context = EXPAND_DIRECTORIES;
|
||||||
if (p == (char_u *)&p_path
|
if (p == (char_u *)&p_path || p == (char_u *)&p_cdpath)
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
|| p == (char_u *)&p_cdpath
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
xp->xp_backslash = XP_BS_THREE;
|
xp->xp_backslash = XP_BS_THREE;
|
||||||
else
|
else
|
||||||
xp->xp_backslash = XP_BS_ONE;
|
xp->xp_backslash = XP_BS_ONE;
|
||||||
|
@ -780,9 +780,7 @@ EXTERN char_u *p_pex; // 'patchexpr'
|
|||||||
#endif
|
#endif
|
||||||
EXTERN char_u *p_pm; // 'patchmode'
|
EXTERN char_u *p_pm; // 'patchmode'
|
||||||
EXTERN char_u *p_path; // 'path'
|
EXTERN char_u *p_path; // 'path'
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
EXTERN char_u *p_cdpath; // 'cdpath'
|
EXTERN char_u *p_cdpath; // 'cdpath'
|
||||||
#endif
|
|
||||||
#if defined(DYNAMIC_PERL)
|
#if defined(DYNAMIC_PERL)
|
||||||
EXTERN char_u *p_perldll; // 'perldll'
|
EXTERN char_u *p_perldll; // 'perldll'
|
||||||
#endif
|
#endif
|
||||||
@ -908,9 +906,7 @@ EXTERN int p_si; // 'smartindent'
|
|||||||
EXTERN int p_sta; // 'smarttab'
|
EXTERN int p_sta; // 'smarttab'
|
||||||
EXTERN long p_sts; // 'softtabstop'
|
EXTERN long p_sts; // 'softtabstop'
|
||||||
EXTERN int p_sb; // 'splitbelow'
|
EXTERN int p_sb; // 'splitbelow'
|
||||||
#if defined(FEAT_SEARCHPATH)
|
|
||||||
EXTERN char_u *p_sua; // 'suffixesadd'
|
EXTERN char_u *p_sua; // 'suffixesadd'
|
||||||
#endif
|
|
||||||
EXTERN int p_swf; // 'swapfile'
|
EXTERN int p_swf; // 'swapfile'
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
EXTERN long p_smc; // 'synmaxcol'
|
EXTERN long p_smc; // 'synmaxcol'
|
||||||
@ -1196,9 +1192,7 @@ enum
|
|||||||
, BV_SPO
|
, BV_SPO
|
||||||
#endif
|
#endif
|
||||||
, BV_STS
|
, BV_STS
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
, BV_SUA
|
, BV_SUA
|
||||||
#endif
|
|
||||||
, BV_SW
|
, BV_SW
|
||||||
, BV_SWF
|
, BV_SWF
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
|
@ -123,9 +123,7 @@
|
|||||||
# define PV_SPO OPT_BUF(BV_SPO)
|
# define PV_SPO OPT_BUF(BV_SPO)
|
||||||
#endif
|
#endif
|
||||||
#define PV_STS OPT_BUF(BV_STS)
|
#define PV_STS OPT_BUF(BV_STS)
|
||||||
#ifdef FEAT_SEARCHPATH
|
#define PV_SUA OPT_BUF(BV_SUA)
|
||||||
# define PV_SUA OPT_BUF(BV_SUA)
|
|
||||||
#endif
|
|
||||||
#define PV_SW OPT_BUF(BV_SW)
|
#define PV_SW OPT_BUF(BV_SW)
|
||||||
#define PV_SWF OPT_BUF(BV_SWF)
|
#define PV_SWF OPT_BUF(BV_SWF)
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
@ -546,13 +544,8 @@ static struct vimoption options[] =
|
|||||||
{(char_u *)FALSE, (char_u *)0L}
|
{(char_u *)FALSE, (char_u *)0L}
|
||||||
SCTX_INIT},
|
SCTX_INIT},
|
||||||
{"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE|P_COMMA|P_NODUP,
|
{"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 *)&p_cdpath, PV_NONE,
|
||||||
{(char_u *)",,", (char_u *)0L}
|
{(char_u *)",,", (char_u *)0L}
|
||||||
#else
|
|
||||||
(char_u *)NULL, PV_NONE,
|
|
||||||
{(char_u *)0L, (char_u *)0L}
|
|
||||||
#endif
|
|
||||||
SCTX_INIT},
|
SCTX_INIT},
|
||||||
{"cedit", NULL, P_STRING,
|
{"cedit", NULL, P_STRING,
|
||||||
#ifdef FEAT_CMDWIN
|
#ifdef FEAT_CMDWIN
|
||||||
@ -2380,13 +2373,8 @@ static struct vimoption options[] =
|
|||||||
{(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
|
{(char_u *)".bak,~,.o,.h,.info,.swp,.obj",
|
||||||
(char_u *)0L} SCTX_INIT},
|
(char_u *)0L} SCTX_INIT},
|
||||||
{"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_ONECOMMA|P_NODUP,
|
{"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_ONECOMMA|P_NODUP,
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
(char_u *)&p_sua, PV_SUA,
|
(char_u *)&p_sua, PV_SUA,
|
||||||
{(char_u *)"", (char_u *)0L}
|
{(char_u *)"", (char_u *)0L}
|
||||||
#else
|
|
||||||
(char_u *)NULL, PV_NONE,
|
|
||||||
{(char_u *)0L, (char_u *)0L}
|
|
||||||
#endif
|
|
||||||
SCTX_INIT},
|
SCTX_INIT},
|
||||||
{"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT,
|
{"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT,
|
||||||
(char_u *)&p_swf, PV_SWF,
|
(char_u *)&p_swf, PV_SWF,
|
||||||
|
@ -253,9 +253,7 @@ check_buf_options(buf_T *buf)
|
|||||||
check_string_option(&buf->b_s.b_p_spl);
|
check_string_option(&buf->b_s.b_p_spl);
|
||||||
check_string_option(&buf->b_s.b_p_spo);
|
check_string_option(&buf->b_s.b_p_spo);
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
check_string_option(&buf->b_p_sua);
|
check_string_option(&buf->b_p_sua);
|
||||||
#endif
|
|
||||||
check_string_option(&buf->b_p_cink);
|
check_string_option(&buf->b_p_cink);
|
||||||
check_string_option(&buf->b_p_cino);
|
check_string_option(&buf->b_p_cino);
|
||||||
check_string_option(&buf->b_p_cinsd);
|
check_string_option(&buf->b_p_cinsd);
|
||||||
|
@ -914,7 +914,6 @@ get_spec_reg(
|
|||||||
emsg(_(e_no_inserted_text_yet));
|
emsg(_(e_no_inserted_text_yet));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
case Ctrl_F: // Filename under cursor
|
case Ctrl_F: // Filename under cursor
|
||||||
case Ctrl_P: // Path under cursor, expand via "path"
|
case Ctrl_P: // Path under cursor, expand via "path"
|
||||||
if (!errmsg)
|
if (!errmsg)
|
||||||
@ -923,7 +922,6 @@ get_spec_reg(
|
|||||||
| (regname == Ctrl_P ? FNAME_EXP : 0), 1L, NULL);
|
| (regname == Ctrl_P ? FNAME_EXP : 0), 1L, NULL);
|
||||||
*allocated = TRUE;
|
*allocated = TRUE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#endif
|
|
||||||
|
|
||||||
case Ctrl_W: // word under cursor
|
case Ctrl_W: // word under cursor
|
||||||
case Ctrl_A: // WORD (mnemonic All) under cursor
|
case Ctrl_A: // WORD (mnemonic All) under cursor
|
||||||
@ -2586,10 +2584,8 @@ get_reg_type(int regname, long *reglen)
|
|||||||
case ':': // last command line
|
case ':': // last command line
|
||||||
case '/': // last search-pattern
|
case '/': // last search-pattern
|
||||||
case '.': // last inserted text
|
case '.': // last inserted text
|
||||||
# ifdef FEAT_SEARCHPATH
|
|
||||||
case Ctrl_F: // Filename under cursor
|
case Ctrl_F: // Filename under cursor
|
||||||
case Ctrl_P: // Path under cursor, expand via "path"
|
case Ctrl_P: // Path under cursor, expand via "path"
|
||||||
# endif
|
|
||||||
case Ctrl_W: // word under cursor
|
case Ctrl_W: // word under cursor
|
||||||
case Ctrl_A: // WORD (mnemonic All) under cursor
|
case Ctrl_A: // WORD (mnemonic All) under cursor
|
||||||
case '_': // black hole: always empty
|
case '_': // black hole: always empty
|
||||||
|
@ -2973,9 +2973,7 @@ struct file_buffer
|
|||||||
int b_p_si; // 'smartindent'
|
int b_p_si; // 'smartindent'
|
||||||
long b_p_sts; // 'softtabstop'
|
long b_p_sts; // 'softtabstop'
|
||||||
long b_p_sts_nopaste; // b_p_sts saved for paste mode
|
long b_p_sts_nopaste; // b_p_sts saved for paste mode
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
char_u *b_p_sua; // 'suffixesadd'
|
char_u *b_p_sua; // 'suffixesadd'
|
||||||
#endif
|
|
||||||
int b_p_swf; // 'swapfile'
|
int b_p_swf; // 'swapfile'
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
long b_p_smc; // 'synmaxcol'
|
long b_p_smc; // 'synmaxcol'
|
||||||
|
@ -949,7 +949,6 @@ endfunc
|
|||||||
|
|
||||||
" Test for the default CDPATH option
|
" Test for the default CDPATH option
|
||||||
func Test_opt_default_cdpath()
|
func Test_opt_default_cdpath()
|
||||||
CheckFeature file_in_path
|
|
||||||
let after =<< trim [CODE]
|
let after =<< trim [CODE]
|
||||||
call assert_equal(',/path/to/dir1,/path/to/dir2', &cdpath)
|
call assert_equal(',/path/to/dir1,/path/to/dir2', &cdpath)
|
||||||
call writefile(v:errors, 'Xtestout')
|
call writefile(v:errors, 'Xtestout')
|
||||||
|
@ -246,11 +246,7 @@ static char *(features[]) =
|
|||||||
"-extra_search",
|
"-extra_search",
|
||||||
#endif
|
#endif
|
||||||
"-farsi",
|
"-farsi",
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
"+file_in_path",
|
"+file_in_path",
|
||||||
#else
|
|
||||||
"-file_in_path",
|
|
||||||
#endif
|
|
||||||
#ifdef FEAT_FIND_ID
|
#ifdef FEAT_FIND_ID
|
||||||
"+find_in_path",
|
"+find_in_path",
|
||||||
#else
|
#else
|
||||||
@ -731,6 +727,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
265,
|
||||||
/**/
|
/**/
|
||||||
264,
|
264,
|
||||||
/**/
|
/**/
|
||||||
|
13
src/window.c
13
src/window.c
@ -136,10 +136,8 @@ do_window(
|
|||||||
{
|
{
|
||||||
long Prenum1;
|
long Prenum1;
|
||||||
win_T *wp;
|
win_T *wp;
|
||||||
#if defined(FEAT_SEARCHPATH) || defined(FEAT_FIND_ID)
|
|
||||||
char_u *ptr;
|
char_u *ptr;
|
||||||
linenr_T lnum = -1;
|
linenr_T lnum = -1;
|
||||||
#endif
|
|
||||||
#ifdef FEAT_FIND_ID
|
#ifdef FEAT_FIND_ID
|
||||||
int type = FIND_DEFINE;
|
int type = FIND_DEFINE;
|
||||||
int len;
|
int len;
|
||||||
@ -521,7 +519,6 @@ newwindow:
|
|||||||
do_nv_ident(Ctrl_RSB, NUL);
|
do_nv_ident(Ctrl_RSB, NUL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
// edit file name under cursor in a new window
|
// edit file name under cursor in a new window
|
||||||
case 'f':
|
case 'f':
|
||||||
case 'F':
|
case 'F':
|
||||||
@ -534,9 +531,9 @@ wingotofile:
|
|||||||
{
|
{
|
||||||
tabpage_T *oldtab = curtab;
|
tabpage_T *oldtab = curtab;
|
||||||
win_T *oldwin = curwin;
|
win_T *oldwin = curwin;
|
||||||
# ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
need_mouse_correct = TRUE;
|
need_mouse_correct = TRUE;
|
||||||
# endif
|
#endif
|
||||||
setpcmark();
|
setpcmark();
|
||||||
if (win_split(0, 0) == OK)
|
if (win_split(0, 0) == OK)
|
||||||
{
|
{
|
||||||
@ -559,7 +556,6 @@ wingotofile:
|
|||||||
vim_free(ptr);
|
vim_free(ptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FEAT_FIND_ID
|
#ifdef FEAT_FIND_ID
|
||||||
// Go to the first occurrence of the identifier under cursor along path in a
|
// Go to the first occurrence of the identifier under cursor along path in a
|
||||||
@ -637,13 +633,12 @@ wingotofile:
|
|||||||
do_nv_ident('g', xchar);
|
do_nv_ident('g', xchar);
|
||||||
break;
|
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
|
||||||
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;
|
cmdmod.cmod_tab = tabpage_index(curtab) + 1;
|
||||||
nchar = xchar;
|
nchar = xchar;
|
||||||
goto wingotofile;
|
goto wingotofile;
|
||||||
#endif
|
|
||||||
case 't': // CTRL-W gt: go to next tab page
|
case 't': // CTRL-W gt: go to next tab page
|
||||||
goto_tabpage((int)Prenum);
|
goto_tabpage((int)Prenum);
|
||||||
break;
|
break;
|
||||||
@ -713,11 +708,9 @@ get_wincmd_addr_type(char_u *arg, exarg_T *eap)
|
|||||||
#if defined(FEAT_QUICKFIX)
|
#if defined(FEAT_QUICKFIX)
|
||||||
case '}':
|
case '}':
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_SEARCHPATH
|
|
||||||
case 'f':
|
case 'f':
|
||||||
case 'F':
|
case 'F':
|
||||||
case Ctrl_F:
|
case Ctrl_F:
|
||||||
#endif
|
|
||||||
#ifdef FEAT_FIND_ID
|
#ifdef FEAT_FIND_ID
|
||||||
case 'i':
|
case 'i':
|
||||||
case Ctrl_I:
|
case Ctrl_I:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user