Fix completion of file names with '%' and '*'.
diff --git a/src/fileio.c b/src/fileio.c
index 2685101..4a9a7f1 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -10189,6 +10189,13 @@
}
}
#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 @@
)
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)