summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-12 19:08:15 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-12 19:08:15 +0100
commit7c29f387819b5817b003d2ba73e2b5cf3cb3d0dd (patch)
treedddf01998f1273012d96d067bbd92828606da23c /src/regexp_nfa.c
parent7823a3bd2eed6ff9e544d201de96710bd5344aaf (diff)
downloadvim-git-7c29f387819b5817b003d2ba73e2b5cf3cb3d0dd.tar.gz
patch 7.4.1305v7.4.1305
Problem: "\%1l^#.*" does not match on a line starting with "#". Solution: Do not clear the start-of-line flag. (Christian Brabandt)
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r--src/regexp_nfa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 8bcf3bc41..865d67fdf 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1128,6 +1128,7 @@ nfa_regatom(void)
int startc = -1;
int endc = -1;
int oldstartc = -1;
+ int save_prev_at_start = prev_at_start;
c = getchr();
switch (c)
@@ -1467,9 +1468,13 @@ nfa_regatom(void)
if (c == 'l' || c == 'c' || c == 'v')
{
if (c == 'l')
+ {
/* \%{n}l \%{n}<l \%{n}>l */
EMIT(cmp == '<' ? NFA_LNUM_LT :
cmp == '>' ? NFA_LNUM_GT : NFA_LNUM);
+ if (save_prev_at_start)
+ at_start = TRUE;
+ }
else if (c == 'c')
/* \%{n}c \%{n}<c \%{n}>c */
EMIT(cmp == '<' ? NFA_COL_LT :