summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-04 18:28:48 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-04 18:28:48 +0200
commitdacd7de3fd5edd8f3a41ba3c9c389b653b6a9e5d (patch)
treeb7c94afb57d66ab24bdc53e9362501e177ed0aee /src/regexp_nfa.c
parentf811509c036306595be026f5e49dde170abb216c (diff)
downloadvim-git-dacd7de3fd5edd8f3a41ba3c9c389b653b6a9e5d.tar.gz
updated for version 7.3.1112v7.3.1112
Problem: New regexp engine: \%V not supported. Solution: Implement \%V. Add tests.
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r--src/regexp_nfa.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index f1bd66523..0a1dec697 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -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;