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