0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

Fix completion of file names with '%' and '*'.

This commit is contained in:
Bram Moolenaar
2010-06-01 21:57:09 +02:00
parent 83d09bb85e
commit 8cd213c09a
5 changed files with 156 additions and 4 deletions

View File

@@ -10189,6 +10189,13 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
}
}
#endif
/* Undo escaping from ExpandEscape():
* foo\?bar -> foo?bar
* foo\%bar -> foo%bar
* foo\,bar -> foo,bar
* foo\ bar -> foo bar
* Don't unescape \, * and others that are also special in a
* regexp. */
if (*++p == '?'
#ifdef BACKSLASH_IN_FILENAME
&& no_bslash
@@ -10196,8 +10203,8 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
)
reg_pat[i++] = '?';
else
if (*p == ',')
reg_pat[i++] = ',';
if (*p == ',' || *p == '%' || *p == '#' || *p == ' ')
reg_pat[i++] = *p;
else
{
if (allow_dirs != NULL && vim_ispathsep(*p)