1
0
forked from aniani/vim

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().
This commit is contained in:
Bram Moolenaar
2013-07-21 17:06:00 +02:00
parent 9ba7e17de1
commit ac7c33e38c
7 changed files with 30 additions and 5 deletions

View File

@@ -5749,12 +5749,12 @@ nfa_regmatch(prog, start, submatch, m)
break;
case NFA_PRINT: /* \p */
result = ptr2cells(reginput) == 1;
result = vim_isprintc(PTR2CHAR(reginput));
ADD_STATE_IF_MATCH(t->state);
break;
case NFA_SPRINT: /* \P */
result = !VIM_ISDIGIT(curc) && ptr2cells(reginput) == 1;
result = !VIM_ISDIGIT(curc) && vim_isprintc(PTR2CHAR(reginput));
ADD_STATE_IF_MATCH(t->state);
break;