0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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.
This commit is contained in:
Bram Moolenaar
2013-08-02 15:22:39 +02:00
parent 542805a59d
commit a946afe075
3 changed files with 13 additions and 2 deletions

View File

@@ -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)