1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When editing a file such as "File[2010-08-15].vim" an E16 error is
13 Solution: Don't give an error for failing to compile the regexp.
14 Files: src/ex_docmd.c, src/misc1.c, src/vim.h
17 *** ../vim-7.3.254/src/ex_docmd.c 2011-06-13 01:19:48.000000000 +0200
18 --- src/ex_docmd.c 2011-07-20 14:48:01.000000000 +0200
21 old_arg_count = GARGCOUNT;
22 if (expand_wildcards(old_arg_count, old_arg_files,
23 &new_arg_file_count, &new_arg_files,
24 ! EW_FILE|EW_NOTFOUND|EW_ADDSLASH) == OK
25 && new_arg_file_count > 0)
27 alist_set(&global_alist, new_arg_file_count, new_arg_files,
29 old_arg_count = GARGCOUNT;
30 if (expand_wildcards(old_arg_count, old_arg_files,
31 &new_arg_file_count, &new_arg_files,
32 ! EW_FILE|EW_NOTFOUND|EW_ADDSLASH|EW_NOERROR) == OK
33 && new_arg_file_count > 0)
35 alist_set(&global_alist, new_arg_file_count, new_arg_files,
36 *** ../vim-7.3.254/src/misc1.c 2011-07-15 14:12:25.000000000 +0200
37 --- src/misc1.c 2011-07-20 14:55:09.000000000 +0200
43 /* compile the regexp into a program */
44 + if (flags & EW_NOERROR)
46 regmatch.rm_ic = TRUE; /* Always ignore case */
47 regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
48 + if (flags & EW_NOERROR)
52 if (regmatch.regprog == NULL)
53 *** ../vim-7.3.254/src/vim.h 2011-06-13 02:03:55.000000000 +0200
54 --- src/vim.h 2011-07-20 14:50:13.000000000 +0200
58 #define EW_EXEC 0x40 /* executable files */
59 #define EW_PATH 0x80 /* search in 'path' too */
60 #define EW_ICASE 0x100 /* ignore case */
61 + #define EW_NOERROR 0x200 /* no error for bad regexp */
62 /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
63 * is used when executing commands and EW_SILENT for interactive expanding. */
65 *** ../vim-7.3.254/src/version.c 2011-07-15 21:24:06.000000000 +0200
66 --- src/version.c 2011-07-20 15:03:52.000000000 +0200
70 { /* Add new patch number below this line */
76 Not too long ago, a program was something you watched on TV...
78 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
79 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
80 \\\ an exciting new programming language -- http://www.Zimbu.org ///
81 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///