1
0
forked from aniani/vim

updated for version 7.3.1112

Problem:    New regexp engine: \%V not supported.
Solution:   Implement \%V.  Add tests.
This commit is contained in:
Bram Moolenaar
2013-06-04 18:28:48 +02:00
parent f811509c03
commit dacd7de3fd
5 changed files with 111 additions and 75 deletions

View File

@@ -178,6 +178,7 @@ enum
NFA_VCOL, /* Match cursor virtual column */
NFA_VCOL_GT, /* Match > cursor virtual column */
NFA_VCOL_LT, /* Match < cursor virtual column */
NFA_VISUAL, /* Match Visual area */
NFA_FIRST_NL = NFA_ANY + ADD_NL,
NFA_LAST_NL = NFA_NUPPER + ADD_NL,
@@ -960,8 +961,7 @@ nfa_regatom()
break;
case 'V':
/* TODO: not supported yet */
return FAIL;
EMIT(NFA_VISUAL);
break;
case '[':
@@ -4733,6 +4733,13 @@ nfa_regmatch(prog, start, submatch, m)
t->pim, &listidx);
break;
case NFA_VISUAL:
result = reg_match_visual();
if (result)
addstate_here(thislist, t->state->out, &t->subs,
t->pim, &listidx);
break;
default: /* regular character */
{
int c = t->state->c;