updated for version 7.4a.036
Problem: "\p" in a regexp does not match double-width characters.
(Yukihiro Nakadaira)
Solution: Don't count display cells, use vim_isprintc().
diff --git a/src/testdir/test95.in b/src/testdir/test95.in
index 306c1b4..90fa699 100644
--- a/src/testdir/test95.in
+++ b/src/testdir/test95.in
@@ -29,6 +29,7 @@
:" this is not a normal "i" but 0xec
:call add(tl, [2, '\p\+', 'ìa', 'ìa'])
+:call add(tl, [2, '\p*', 'aあ', 'aあ'])
:"""" Test recognition of some character classes
:call add(tl, [2, '\i\+', '&*¨xx ', 'xx'])
@@ -118,6 +119,16 @@
:endfor
:unlet t tl e l
+:" check that 'ambiwidth' does not change the meaning of \p
+:set regexpengine=1 ambiwidth=single
+:$put ='eng 1 ambi single: ' . match(\"\u00EC\", '\p')
+:set regexpengine=1 ambiwidth=double
+:$put ='eng 1 ambi double: ' . match(\"\u00EC\", '\p')
+:set regexpengine=2 ambiwidth=single
+:$put ='eng 2 ambi single: ' . match(\"\u00EC\", '\p')
+:set regexpengine=2 ambiwidth=double
+:$put ='eng 2 ambi double: ' . match(\"\u00EC\", '\p')
+
:/\%#=1^Results/,$wq! test.out
ENDTEST