diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-07-20 15:04:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-07-20 15:04:58 +0200 |
commit | b560983d2f610f7098b6977b2e8fec0554a41ad1 (patch) | |
tree | 78585ff3c5ec188fd49143030834709df5e49a57 /src | |
parent | 9729301aa0b6a419dcd87fe9aeed72c367ae72ef (diff) | |
download | vim-git-b560983d2f610f7098b6977b2e8fec0554a41ad1.tar.gz |
updated for version 7.3.255v7.3.255
Problem: When editing a file such as "File[2010-08-15].vim" an E16 error is
given. (Manuel Stol)
Solution: Don't give an error for failing to compile the regexp.
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/misc1.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 602bbfab4..3e80b329b 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -7069,7 +7069,7 @@ alist_expand(fnum_list, fnum_len) old_arg_count = GARGCOUNT; if (expand_wildcards(old_arg_count, old_arg_files, &new_arg_file_count, &new_arg_files, - EW_FILE|EW_NOTFOUND|EW_ADDSLASH) == OK + EW_FILE|EW_NOTFOUND|EW_ADDSLASH|EW_NOERROR) == OK && new_arg_file_count > 0) { alist_set(&global_alist, new_arg_file_count, new_arg_files, diff --git a/src/misc1.c b/src/misc1.c index c7f2f8059..a573b3b99 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -9043,8 +9043,12 @@ dos_expandpath( } /* compile the regexp into a program */ + if (flags & EW_NOERROR) + ++emsg_silent; regmatch.rm_ic = TRUE; /* Always ignore case */ regmatch.regprog = vim_regcomp(pat, RE_MAGIC); + if (flags & EW_NOERROR) + --emsg_silent; vim_free(pat); if (regmatch.regprog == NULL) diff --git a/src/version.c b/src/version.c index 276bccbf7..2f2307f1e 100644 --- a/src/version.c +++ b/src/version.c @@ -710,6 +710,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 255, +/**/ 254, /**/ 253, @@ -815,6 +815,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname); #define EW_EXEC 0x40 /* executable files */ #define EW_PATH 0x80 /* search in 'path' too */ #define EW_ICASE 0x100 /* ignore case */ +#define EW_NOERROR 0x200 /* no error for bad regexp */ /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND * is used when executing commands and EW_SILENT for interactive expanding. */ |