summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-03 16:53:03 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-03 16:53:03 +0200
commitf4e1143697a2d08eff487dec36128a5e10d5eca8 (patch)
treeeb55b1d73457b226548a93b7d22c260485c6ef4a /src/fileio.c
parenta87aa8061ce670c38d742b0f7e41cc950d10320f (diff)
downloadvim-git-f4e1143697a2d08eff487dec36128a5e10d5eca8.tar.gz
updated for version 7.3.1295v7.3.1295
Problem: glob() and globpath() do not handle escaped special characters properly. Solution: Handle escaped characters differently. (Adnan Zafar)
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index b6f401668..71ecf42ae 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -10301,7 +10301,10 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
* foo\,bar -> foo,bar
* foo\ bar -> foo bar
* Don't unescape \, * and others that are also special in a
- * regexp. */
+ * regexp.
+ * An escaped { must be unescaped since we use magic not
+ * verymagic.
+ */
if (*++p == '?'
#ifdef BACKSLASH_IN_FILENAME
&& no_bslash
@@ -10309,7 +10312,8 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
)
reg_pat[i++] = '?';
else
- if (*p == ',' || *p == '%' || *p == '#' || *p == ' ')
+ if (*p == ',' || *p == '%' || *p == '#'
+ || *p == ' ' || *p == '{')
reg_pat[i++] = *p;
else
{