From 8cd213c09a3598834888d81deb45ff17e6654a86 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 1 Jun 2010 21:57:09 +0200 Subject: Fix completion of file names with '%' and '*'. --- src/fileio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/fileio.c') diff --git a/src/fileio.c b/src/fileio.c index 268510117..4a9a7f10e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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) -- cgit v1.2.1