Mercurial > vim
diff src/fileio.c @ 5259:6b7ab6a4f31a v7.4b.006
updated for version 7.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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 02 Aug 2013 15:22:39 +0200 |
parents | 74d2f3188cd0 |
children | 3059c799fcd9 |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -10327,7 +10327,7 @@ file_pat_to_reg_pat(pat, pat_end, allow_ * 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_ 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)