changeset 4468:dde1cf311be6 v7.3.982

updated for version 7.3.982 Problem: In the new regexp engine \p does not work on multi-byte characters. Solution: Don't point to an integer but the characters.
author Bram Moolenaar <bram@vim.org>
date Tue, 21 May 2013 12:34:17 +0200
parents 6ea4431f7939
children 2b18e761c8d5
files src/regexp_nfa.c src/testdir/test95.in src/testdir/test95.ok src/version.c
diffstat 4 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -2931,7 +2931,7 @@ again:
 	}
 	if (c == NUL)
 	    n = 0;
-	cc = (char_u *)&c;
+	cc = reginput;
 
 	/* swap lists */
 	thislist = &list[flag];
@@ -2960,7 +2960,7 @@ again:
 	    if (neglist->n > 0)
 	    {
 		t = &neglist->t[0];
-		neglist->n --;
+		neglist->n--;
 		i--;
 	    }
 	    else
--- a/src/testdir/test95.in
+++ b/src/testdir/test95.in
@@ -25,6 +25,9 @@ STARTTEST
 :call add(tl, [' [^ ]\+', 'start มabcdม ', ' มabcdม'])
 :call add(tl, ['[ม[:alpha:][=a=]]\+', '879 aiaãมâมaiuvna ', 'aiaãมâมaiuvna'])
 
+:" this is not a normal "i" but 0xec
+:call add(tl, ['\p\+', 'ìa', 'ìa'])
+
 :"""" Run the tests
 
 :"
--- a/src/testdir/test95.ok
+++ b/src/testdir/test95.ok
@@ -4,3 +4,4 @@ OK - [[=a=]]\+
 OK - [^ม ]\+
 OK -  [^ ]\+
 OK - [ม[:alpha:][=a=]]\+
+OK - \p\+
--- 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 */
 /**/
+    982,
+/**/
     981,
 /**/
     980,