]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1127 v7.3.1127
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Jun 2013 19:30:37 +0000 (21:30 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Jun 2013 19:30:37 +0000 (21:30 +0200)
Problem:    No error for using empty \%[].
Solution:   Give error message.

src/regexp.c
src/regexp_nfa.c
src/version.c

index bf640fce2a161cc30bdffe49f966f00c656be0f3..432d7b577df36f626fe82b07bb18b9c1ac87dd60 100644 (file)
@@ -366,7 +366,7 @@ static char_u e_z_not_allowed[] = N_("E66: \\z( not allowed here");
 static char_u e_z1_not_allowed[] = N_("E67: \\z1 et al. not allowed here");
 #endif
 static char_u e_missing_sb[] = N_("E69: Missing ] after %s%%[");
-
+static char_u e_empty_sb[]  = N_("E70: Empty %s%%[]");
 #define NOT_MULTI      0
 #define MULTI_ONE      1
 #define MULTI_MULT     2
@@ -2227,7 +2227,7 @@ regatom(flagp)
                                      return NULL;
                              }
                              if (ret == NULL)
-                                 EMSG2_RET_NULL(_("E70: Empty %s%%[]"),
+                                 EMSG2_RET_NULL(_(e_empty_sb),
                                                      reg_magic == MAGIC_ALL);
                              lastbranch = regnode(BRANCH);
                              br = regnode(NOTHING);
index 189e413ffec694a8a3de269e0b40efbe3458974e..ec5543c466d3f5e4348d30094e5760e4f5fd25e5 100644 (file)
@@ -977,6 +977,9 @@ nfa_regatom()
                                                      reg_magic == MAGIC_ALL);
                            EMIT(c);
                        }
+                       if (n == 0)
+                           EMSG2_RET_FAIL(_(e_empty_sb),
+                                                     reg_magic == MAGIC_ALL);
                        EMIT(NFA_OPT_CHARS);
                        EMIT(n);
                        break;
index 92fa3d767f54bf8405432434bf801e743b93d4fa..fe9465a0edc6bd6b6d956f12cfe9fdeb6ce5be4e 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1127,
 /**/
     1126,
 /**/