Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
5258:01452b8a075a | 5259:6b7ab6a4f31a |
---|---|
10325 * foo\,bar -> foo,bar | 10325 * foo\,bar -> foo,bar |
10326 * foo\ bar -> foo bar | 10326 * foo\ bar -> foo bar |
10327 * Don't unescape \, * and others that are also special in a | 10327 * Don't unescape \, * and others that are also special in a |
10328 * regexp. | 10328 * regexp. |
10329 * An escaped { must be unescaped since we use magic not | 10329 * An escaped { must be unescaped since we use magic not |
10330 * verymagic. | 10330 * verymagic. Use "\\\{n,m\}"" to get "\{n,m}". |
10331 */ | 10331 */ |
10332 if (*++p == '?' | 10332 if (*++p == '?' |
10333 #ifdef BACKSLASH_IN_FILENAME | 10333 #ifdef BACKSLASH_IN_FILENAME |
10334 && no_bslash | 10334 && no_bslash |
10335 #endif | 10335 #endif |
10336 ) | 10336 ) |
10337 reg_pat[i++] = '?'; | 10337 reg_pat[i++] = '?'; |
10338 else | 10338 else |
10339 if (*p == ',' || *p == '%' || *p == '#' | 10339 if (*p == ',' || *p == '%' || *p == '#' |
10340 || *p == ' ' || *p == '{') | 10340 || *p == ' ' || *p == '{' || *p == '}') |
10341 reg_pat[i++] = *p; | 10341 reg_pat[i++] = *p; |
10342 else if (*p == '\\' && p[1] == '\\' && p[2] == '{') | |
10343 { | |
10344 reg_pat[i++] = '\\'; | |
10345 reg_pat[i++] = '{'; | |
10346 p += 2; | |
10347 } | |
10342 else | 10348 else |
10343 { | 10349 { |
10344 if (allow_dirs != NULL && vim_ispathsep(*p) | 10350 if (allow_dirs != NULL && vim_ispathsep(*p) |
10345 #ifdef BACKSLASH_IN_FILENAME | 10351 #ifdef BACKSLASH_IN_FILENAME |
10346 && (!no_bslash || *p != '\\') | 10352 && (!no_bslash || *p != '\\') |