| To: vim-dev@vim.org |
| Subject: Patch 7.1.183 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.1.183 |
| Problem: "Internal error" for ":echo matchstr('a', 'a\%[\&]')" (Mitanu |
| Paul) |
| Solution: Inside "\%[]" detect \&, \| and \) as an error. |
| Files: src/regexp.c |
| |
| |
| |
| |
| |
| *** 1288,1295 **** |
| } |
| |
| /* |
| ! * regbranch - one alternative of an | operator |
| ! * |
| * Implements the & operator. |
| */ |
| static char_u * |
| --- 1288,1294 ---- |
| } |
| |
| /* |
| ! * Handle one alternative of an | operator. |
| * Implements the & operator. |
| */ |
| static char_u * |
| |
| *** 1330,1337 **** |
| } |
| |
| /* |
| ! * regbranch - one alternative of an | or & operator |
| ! * |
| * Implements the concatenation operator. |
| */ |
| static char_u * |
| --- 1329,1335 ---- |
| } |
| |
| /* |
| ! * Handle one alternative of an | or & operator. |
| * Implements the concatenation operator. |
| */ |
| static char_u * |
| |
| *** 1708,1713 **** |
| --- 1706,1713 ---- |
| case Magic('|'): |
| case Magic('&'): |
| case Magic(')'): |
| + if (one_exactly) |
| + EMSG_ONE_RET_NULL; |
| EMSG_RET_NULL(_(e_internal)); /* Supposed to be caught earlier. */ |
| /* NOTREACHED */ |
| |
| |
| *** 3106,3112 **** |
| * slow, we keep one allocated piece of memory and only re-allocate it when |
| * it's too small. It's freed in vim_regexec_both() when finished. |
| */ |
| ! static char_u *reg_tofree; |
| static unsigned reg_tofreelen; |
| |
| /* |
| --- 3106,3112 ---- |
| * slow, we keep one allocated piece of memory and only re-allocate it when |
| * it's too small. It's freed in vim_regexec_both() when finished. |
| */ |
| ! static char_u *reg_tofree = NULL; |
| static unsigned reg_tofreelen; |
| |
| /* |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 183, |
| /**/ |
| |
| -- |
| Not too long ago, unzipping in public was illegal... |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |