|
Karsten Hopp |
7ec0ac |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
7ec0ac |
Subject: Patch 7.3.1010
|
|
Karsten Hopp |
7ec0ac |
Fcc: outbox
|
|
Karsten Hopp |
7ec0ac |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
7ec0ac |
Mime-Version: 1.0
|
|
Karsten Hopp |
7ec0ac |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
7ec0ac |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
7ec0ac |
------------
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
Patch 7.3.1010
|
|
Karsten Hopp |
7ec0ac |
Problem: New regexp: adding \Z makes every character match.
|
|
Karsten Hopp |
7ec0ac |
Solution: Only apply ireg_icombine for composing characters.
|
|
Karsten Hopp |
7ec0ac |
Alsl add missing change from patch 1008. (Ken Takata)
|
|
Karsten Hopp |
7ec0ac |
Files: src/regexp_nfa.c, src/testdir/test95.in, src/testdir/test95.ok
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
*** ../vim-7.3.1009/src/regexp_nfa.c 2013-05-23 22:25:10.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
--- src/regexp_nfa.c 2013-05-24 20:20:14.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 2859,2865 ****
|
|
Karsten Hopp |
7ec0ac |
List *listtbl[2][2];
|
|
Karsten Hopp |
7ec0ac |
List *ll;
|
|
Karsten Hopp |
7ec0ac |
int listid = 1;
|
|
Karsten Hopp |
7ec0ac |
! int endnode = 0;
|
|
Karsten Hopp |
7ec0ac |
List *thislist;
|
|
Karsten Hopp |
7ec0ac |
List *nextlist;
|
|
Karsten Hopp |
7ec0ac |
List *neglist;
|
|
Karsten Hopp |
7ec0ac |
--- 2859,2865 ----
|
|
Karsten Hopp |
7ec0ac |
List *listtbl[2][2];
|
|
Karsten Hopp |
7ec0ac |
List *ll;
|
|
Karsten Hopp |
7ec0ac |
int listid = 1;
|
|
Karsten Hopp |
7ec0ac |
! int endnode;
|
|
Karsten Hopp |
7ec0ac |
List *thislist;
|
|
Karsten Hopp |
7ec0ac |
List *nextlist;
|
|
Karsten Hopp |
7ec0ac |
List *neglist;
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 3192,3204 ****
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
case NFA_MULTIBYTE:
|
|
Karsten Hopp |
7ec0ac |
case NFA_COMPOSING:
|
|
Karsten Hopp |
7ec0ac |
! switch (t->state->c)
|
|
Karsten Hopp |
7ec0ac |
! {
|
|
Karsten Hopp |
7ec0ac |
! case NFA_MULTIBYTE: endnode = NFA_END_MULTIBYTE; break;
|
|
Karsten Hopp |
7ec0ac |
! case NFA_COMPOSING: endnode = NFA_END_COMPOSING; break;
|
|
Karsten Hopp |
7ec0ac |
! default: endnode = 0;
|
|
Karsten Hopp |
7ec0ac |
! }
|
|
Karsten Hopp |
7ec0ac |
!
|
|
Karsten Hopp |
7ec0ac |
result = OK;
|
|
Karsten Hopp |
7ec0ac |
sta = t->state->out;
|
|
Karsten Hopp |
7ec0ac |
len = 1;
|
|
Karsten Hopp |
7ec0ac |
--- 3192,3198 ----
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
case NFA_MULTIBYTE:
|
|
Karsten Hopp |
7ec0ac |
case NFA_COMPOSING:
|
|
Karsten Hopp |
7ec0ac |
! endnode = t->state->c + 1;
|
|
Karsten Hopp |
7ec0ac |
result = OK;
|
|
Karsten Hopp |
7ec0ac |
sta = t->state->out;
|
|
Karsten Hopp |
7ec0ac |
len = 1;
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 3206,3212 ****
|
|
Karsten Hopp |
7ec0ac |
{
|
|
Karsten Hopp |
7ec0ac |
if (reginput[len-1] != sta->c)
|
|
Karsten Hopp |
7ec0ac |
{
|
|
Karsten Hopp |
7ec0ac |
! result = OK - 1;
|
|
Karsten Hopp |
7ec0ac |
break;
|
|
Karsten Hopp |
7ec0ac |
}
|
|
Karsten Hopp |
7ec0ac |
len++;
|
|
Karsten Hopp |
7ec0ac |
--- 3200,3206 ----
|
|
Karsten Hopp |
7ec0ac |
{
|
|
Karsten Hopp |
7ec0ac |
if (reginput[len-1] != sta->c)
|
|
Karsten Hopp |
7ec0ac |
{
|
|
Karsten Hopp |
7ec0ac |
! result = FAIL;
|
|
Karsten Hopp |
7ec0ac |
break;
|
|
Karsten Hopp |
7ec0ac |
}
|
|
Karsten Hopp |
7ec0ac |
len++;
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 3215,3225 ****
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
/* if input char length doesn't match regexp char length */
|
|
Karsten Hopp |
7ec0ac |
if (len -1 < n || sta->c != endnode)
|
|
Karsten Hopp |
7ec0ac |
! result = OK - 1;
|
|
Karsten Hopp |
7ec0ac |
end = t->state->out1; /* NFA_END_MULTIBYTE or
|
|
Karsten Hopp |
7ec0ac |
NFA_END_COMPOSING */
|
|
Karsten Hopp |
7ec0ac |
/* If \Z was present, then ignore composing characters */
|
|
Karsten Hopp |
7ec0ac |
! if (regflags & RF_ICOMBINE)
|
|
Karsten Hopp |
7ec0ac |
result = 1 ^ sta->negated;
|
|
Karsten Hopp |
7ec0ac |
ADD_POS_NEG_STATE(end);
|
|
Karsten Hopp |
7ec0ac |
break;
|
|
Karsten Hopp |
7ec0ac |
--- 3209,3219 ----
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
/* if input char length doesn't match regexp char length */
|
|
Karsten Hopp |
7ec0ac |
if (len -1 < n || sta->c != endnode)
|
|
Karsten Hopp |
7ec0ac |
! result = FAIL;
|
|
Karsten Hopp |
7ec0ac |
end = t->state->out1; /* NFA_END_MULTIBYTE or
|
|
Karsten Hopp |
7ec0ac |
NFA_END_COMPOSING */
|
|
Karsten Hopp |
7ec0ac |
/* If \Z was present, then ignore composing characters */
|
|
Karsten Hopp |
7ec0ac |
! if (ireg_icombine && endnode == NFA_END_COMPOSING)
|
|
Karsten Hopp |
7ec0ac |
result = 1 ^ sta->negated;
|
|
Karsten Hopp |
7ec0ac |
ADD_POS_NEG_STATE(end);
|
|
Karsten Hopp |
7ec0ac |
break;
|
|
Karsten Hopp |
7ec0ac |
*** ../vim-7.3.1009/src/testdir/test95.in 2013-05-23 22:43:03.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
--- src/testdir/test95.in 2013-05-24 20:18:13.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 7,13 ****
|
|
Karsten Hopp |
7ec0ac |
STARTTEST
|
|
Karsten Hopp |
7ec0ac |
:so small.vim
|
|
Karsten Hopp |
7ec0ac |
:so mbyte.vim
|
|
Karsten Hopp |
7ec0ac |
! :set nocp encoding=utf-8 viminfo+=nviminfo
|
|
Karsten Hopp |
7ec0ac |
:" tl is a List of Lists with:
|
|
Karsten Hopp |
7ec0ac |
:" regexp pattern
|
|
Karsten Hopp |
7ec0ac |
:" text to test the pattern on
|
|
Karsten Hopp |
7ec0ac |
--- 7,13 ----
|
|
Karsten Hopp |
7ec0ac |
STARTTEST
|
|
Karsten Hopp |
7ec0ac |
:so small.vim
|
|
Karsten Hopp |
7ec0ac |
:so mbyte.vim
|
|
Karsten Hopp |
7ec0ac |
! :set nocp encoding=utf-8 viminfo+=nviminfo nomore
|
|
Karsten Hopp |
7ec0ac |
:" tl is a List of Lists with:
|
|
Karsten Hopp |
7ec0ac |
:" regexp pattern
|
|
Karsten Hopp |
7ec0ac |
:" text to test the pattern on
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 35,45 ****
|
|
Karsten Hopp |
7ec0ac |
:call add(tl, ['\f\+', '&*fname ', 'fname'])
|
|
Karsten Hopp |
7ec0ac |
:call add(tl, ['\%#=1\f\+', '&*fname ', 'fname'])
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
:"""" Combining different tests and features
|
|
Karsten Hopp |
7ec0ac |
:call add(tl, ['[^[=a=]]\+', 'ddaãâbcd', 'dd'])
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
:"""" Run the tests
|
|
Karsten Hopp |
7ec0ac |
-
|
|
Karsten Hopp |
7ec0ac |
:"
|
|
Karsten Hopp |
7ec0ac |
:for t in tl
|
|
Karsten Hopp |
7ec0ac |
: let l = matchlist(t[1], t[0])
|
|
Karsten Hopp |
7ec0ac |
--- 35,47 ----
|
|
Karsten Hopp |
7ec0ac |
:call add(tl, ['\f\+', '&*fname ', 'fname'])
|
|
Karsten Hopp |
7ec0ac |
:call add(tl, ['\%#=1\f\+', '&*fname ', 'fname'])
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
+ :"""" Test \Z
|
|
Karsten Hopp |
7ec0ac |
+ :call add(tl, ['ú\Z', 'x'])
|
|
Karsten Hopp |
7ec0ac |
+
|
|
Karsten Hopp |
7ec0ac |
:"""" Combining different tests and features
|
|
Karsten Hopp |
7ec0ac |
:call add(tl, ['[^[=a=]]\+', 'ddaãâbcd', 'dd'])
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
:"""" Run the tests
|
|
Karsten Hopp |
7ec0ac |
:"
|
|
Karsten Hopp |
7ec0ac |
:for t in tl
|
|
Karsten Hopp |
7ec0ac |
: let l = matchlist(t[1], t[0])
|
|
Karsten Hopp |
7ec0ac |
*** ../vim-7.3.1009/src/testdir/test95.ok 2013-05-23 22:43:03.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
--- src/testdir/test95.ok 2013-05-24 20:18:55.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 9,12 ****
|
|
Karsten Hopp |
7ec0ac |
--- 9,13 ----
|
|
Karsten Hopp |
7ec0ac |
OK - \%#=1\i\+
|
|
Karsten Hopp |
7ec0ac |
OK - \f\+
|
|
Karsten Hopp |
7ec0ac |
OK - \%#=1\f\+
|
|
Karsten Hopp |
7ec0ac |
+ OK - ú\Z
|
|
Karsten Hopp |
7ec0ac |
OK - [^[=a=]]\+
|
|
Karsten Hopp |
7ec0ac |
*** ../vim-7.3.1009/src/version.c 2013-05-24 18:58:39.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
--- src/version.c 2013-05-24 20:21:52.000000000 +0200
|
|
Karsten Hopp |
7ec0ac |
***************
|
|
Karsten Hopp |
7ec0ac |
*** 730,731 ****
|
|
Karsten Hopp |
7ec0ac |
--- 730,733 ----
|
|
Karsten Hopp |
7ec0ac |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
7ec0ac |
+ /**/
|
|
Karsten Hopp |
7ec0ac |
+ 1010,
|
|
Karsten Hopp |
7ec0ac |
/**/
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
--
|
|
Karsten Hopp |
7ec0ac |
Never under any circumstances take a sleeping pill
|
|
Karsten Hopp |
7ec0ac |
and a laxative on the same night.
|
|
Karsten Hopp |
7ec0ac |
|
|
Karsten Hopp |
7ec0ac |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
7ec0ac |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
7ec0ac |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
7ec0ac |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|