diff options
-rw-r--r-- | src/regexp.c | 4 | ||||
-rw-r--r-- | src/regexp_nfa.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/regexp.c b/src/regexp.c index bf640fce2..432d7b577 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -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); diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 189e413ff..ec5543c46 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -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; diff --git a/src/version.c b/src/version.c index 92fa3d767..fe9465a0e 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1127, +/**/ 1126, /**/ 1125, |