mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.2-234
This commit is contained in:
parent
a2974d70f1
commit
055a2ba10e
@ -441,13 +441,20 @@ between files with almost the same name. If there are multiple matches,
|
|||||||
those files with an extension that is in the 'suffixes' option are ignored.
|
those files with an extension that is in the 'suffixes' option are ignored.
|
||||||
The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
|
The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
|
||||||
in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
|
in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
|
||||||
It is impossible to ignore suffixes with two dots. Examples:
|
|
||||||
|
An empty entry, two consecutive commas, match a file name that does not
|
||||||
|
contain a ".", thus has no suffix. This is useful to ignore "prog" and prefer
|
||||||
|
"prog.c".
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
pattern: files: match: ~
|
pattern: files: match: ~
|
||||||
test* test.c test.h test.o test.c
|
test* test.c test.h test.o test.c
|
||||||
test* test.h test.o test.h and test.o
|
test* test.h test.o test.h and test.o
|
||||||
test* test.i test.h test.c test.i and test.c
|
test* test.i test.h test.c test.i and test.c
|
||||||
|
|
||||||
|
It is impossible to ignore suffixes with two dots.
|
||||||
|
|
||||||
If there is more than one matching file (after ignoring the ones matching
|
If there is more than one matching file (after ignoring the ones matching
|
||||||
the 'suffixes' option) the first file name is inserted. You can see that
|
the 'suffixes' option) the first file name is inserted. You can see that
|
||||||
there is only one match when you type 'wildchar' twice and the completed
|
there is only one match when you type 'wildchar' twice and the completed
|
||||||
|
24
src/misc1.c
24
src/misc1.c
@ -8533,11 +8533,25 @@ match_suffix(fname)
|
|||||||
for (setsuf = p_su; *setsuf; )
|
for (setsuf = p_su; *setsuf; )
|
||||||
{
|
{
|
||||||
setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,");
|
setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,");
|
||||||
if (fnamelen >= setsuflen
|
if (setsuflen == 0)
|
||||||
&& fnamencmp(suf_buf, fname + fnamelen - setsuflen,
|
{
|
||||||
(size_t)setsuflen) == 0)
|
char_u *tail = gettail(fname);
|
||||||
break;
|
|
||||||
setsuflen = 0;
|
/* empty entry: match name without a '.' */
|
||||||
|
if (vim_strchr(tail, '.') == NULL)
|
||||||
|
{
|
||||||
|
setsuflen = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (fnamelen >= setsuflen
|
||||||
|
&& fnamencmp(suf_buf, fname + fnamelen - setsuflen,
|
||||||
|
(size_t)setsuflen) == 0)
|
||||||
|
break;
|
||||||
|
setsuflen = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return (setsuflen != 0);
|
return (setsuflen != 0);
|
||||||
}
|
}
|
||||||
|
@ -676,6 +676,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 */
|
||||||
|
/**/
|
||||||
|
234,
|
||||||
/**/
|
/**/
|
||||||
233,
|
233,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user