summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-08-02 15:22:39 +0200
committerBram Moolenaar <Bram@vim.org>2013-08-02 15:22:39 +0200
commita946afe075ce041a638194b6b3bcb100ba2b3689 (patch)
tree07b591ffdccd89cf91e5a98913bfba3c5bd92d32
parent542805a59df19db785dc631f174a15eec40911af (diff)
downloadvim-git-a946afe075ce041a638194b6b3bcb100ba2b3689.tar.gz
updated for version 7.4b.006v7.4b.006
Problem: Using \{n,m} in an autocommand pattern no longer works. Specifically, mutt temp files are not recognized. (Gary Johnson) Solution: Make \\\{n,m\} work.
-rw-r--r--runtime/doc/autocmd.txt3
-rw-r--r--src/fileio.c10
-rw-r--r--src/version.c2
3 files changed, 13 insertions, 2 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 4d7a4260e..543c1df5c 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -961,6 +961,9 @@ The pattern is interpreted like mostly used in file names:
\, matches a ','
{ } like \( \) in a |pattern|
, inside { }: like \| in a |pattern|
+ \} literal }
+ \{ literal {
+ \\\{n,m\} like \{n,m} in a |pattern|
\ special meaning like in a |pattern|
[ch] matches 'c' or 'h'
[^ch] match any character but 'c' and 'h'
diff --git a/src/fileio.c b/src/fileio.c
index fe90246fd..731a7b183 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -10327,7 +10327,7 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
* Don't unescape \, * and others that are also special in a
* regexp.
* An escaped { must be unescaped since we use magic not
- * verymagic.
+ * verymagic. Use "\\\{n,m\}"" to get "\{n,m}".
*/
if (*++p == '?'
#ifdef BACKSLASH_IN_FILENAME
@@ -10337,8 +10337,14 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
reg_pat[i++] = '?';
else
if (*p == ',' || *p == '%' || *p == '#'
- || *p == ' ' || *p == '{')
+ || *p == ' ' || *p == '{' || *p == '}')
reg_pat[i++] = *p;
+ else if (*p == '\\' && p[1] == '\\' && p[2] == '{')
+ {
+ reg_pat[i++] = '\\';
+ reg_pat[i++] = '{';
+ p += 2;
+ }
else
{
if (allow_dirs != NULL && vim_ispathsep(*p)
diff --git a/src/version.c b/src/version.c
index ec2c2c000..77c3e8d57 100644
--- a/src/version.c
+++ b/src/version.c
@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 6,
+/**/
5,
/**/
4,