summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-05-21 00:03:02 +0200
committerBram Moolenaar <bram@vim.org>2013-05-21 00:03:02 +0200
commit4aea87d06d41dadbe4ef123ef3909e8781bb71c9 (patch)
treee0ba344474e432faf1ccddf41e2fea502d2d369c
parent8967cb82e4ccab916bcace53bcd3a523ea911001 (diff)
downloadvim-4aea87d06d41dadbe4ef123ef3909e8781bb71c9.tar.gz
updated for version 7.3.981v7.3.981v7-3-981
Problem: In the old regexp engine \i, \I, \f and \F don't work on multi-byte characters. Solution: Dereference pointer properly.
-rw-r--r--src/regexp.c4
-rw-r--r--src/testdir/test64.in4
-rw-r--r--src/testdir/test64.ok4
-rw-r--r--src/version.c2
4 files changed, 12 insertions, 2 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 60765d72..29b40813 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -5758,7 +5758,7 @@ regrepeat(p, maxcount)
case SIDENT + ADD_NL:
while (count < maxcount)
{
- if (vim_isIDc(*scan) && (testval || !VIM_ISDIGIT(*scan)))
+ if (vim_isIDc(PTR2CHAR(scan)) && (testval || !VIM_ISDIGIT(*scan)))
{
mb_ptr_adv(scan);
}
@@ -5819,7 +5819,7 @@ regrepeat(p, maxcount)
case SFNAME + ADD_NL:
while (count < maxcount)
{
- if (vim_isfilec(*scan) && (testval || !VIM_ISDIGIT(*scan)))
+ if (vim_isfilec(PTR2CHAR(scan)) && (testval || !VIM_ISDIGIT(*scan)))
{
mb_ptr_adv(scan);
}
diff --git a/src/testdir/test64.in b/src/testdir/test64.in
index be712828..37f263b7 100644
--- a/src/testdir/test64.in
+++ b/src/testdir/test64.in
@@ -262,6 +262,10 @@ STARTTEST
:call add(tl, ['[a-zA-Z]', 'a', 'a'])
:call add(tl, ['[A-Z]', 'a'])
:call add(tl, ['\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa'])
+:call add(tl, ['\i\+', '&*§xx ', 'xx'])
+:call add(tl, ['\%#=1\i\+', '&*§xx ', 'xx'])
+:call add(tl, ['\f\+', '&*Ÿfname ', 'fname'])
+:call add(tl, ['\%#=1\i\+', '&*Ÿfname ', 'fname'])
:"""" Tests for \z features
:call add(tl, ['xx \ze test', 'xx ']) " must match after \ze
diff --git a/src/testdir/test64.ok b/src/testdir/test64.ok
index c315a23e..e3f5657e 100644
--- a/src/testdir/test64.ok
+++ b/src/testdir/test64.ok
@@ -203,6 +203,10 @@ OK - [a-z]
OK - [a-zA-Z]
OK - [A-Z]
OK - \C[^A-Z]\+
+OK - \i\+
+OK - \%#=1\i\+
+OK - \f\+
+OK - \%#=1\i\+
OK - xx \ze test
OK - abc\zeend
OK - abc\zsdd
diff --git a/src/version.c b/src/version.c
index bef4af2e..80ac7559 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 */
/**/
+ 981,
+/**/
980,
/**/
979,