diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-21 12:34:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-21 12:34:17 +0200 |
commit | 0fabe3fdbe883935a670bb105f1ba2c5991cd4ea (patch) | |
tree | 79d9b96843638083420777411d8456530fd451c1 | |
parent | 09ea9fcf3f0eef0e0f8f8552d856f8896749e846 (diff) | |
download | vim-git-0fabe3fdbe883935a670bb105f1ba2c5991cd4ea.tar.gz |
updated for version 7.3.982v7.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.
-rw-r--r-- | src/regexp_nfa.c | 4 | ||||
-rw-r--r-- | src/testdir/test95.in | 3 | ||||
-rw-r--r-- | src/testdir/test95.ok | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index d70e46a6f..9ae59ae63 100644 --- 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 diff --git a/src/testdir/test95.in b/src/testdir/test95.in index 78a999f56..fb78b88dd 100644 --- 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 :" diff --git a/src/testdir/test95.ok b/src/testdir/test95.ok index d135b0eb8..cb1577a7e 100644 --- a/src/testdir/test95.ok +++ b/src/testdir/test95.ok @@ -4,3 +4,4 @@ OK - [[=a=]]\+ OK - [^ม ]\+ OK - [^ ]\+ OK - [ม[:alpha:][=a=]]\+ +OK - \p\+ diff --git a/src/version.c b/src/version.c index 80ac75591..a57f685bf 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 */ /**/ + 982, +/**/ 981, /**/ 980, |