comparison src/regexp_nfa.c @ 8021:b6b4f354df23 v7.4.1305

commit https://github.com/vim/vim/commit/7c29f387819b5817b003d2ba73e2b5cf3cb3d0dd Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 12 19:08:15 2016 +0100 patch 7.4.1305 Problem: "\%1l^#.*" does not match on a line starting with "#". Solution: Do not clear the start-of-line flag. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Fri, 12 Feb 2016 19:15:05 +0100
parents c079097365f3
children f196308a2813
comparison
equal deleted inserted replaced
8020:7250994a8654 8021:b6b4f354df23
1126 int negated; 1126 int negated;
1127 int result; 1127 int result;
1128 int startc = -1; 1128 int startc = -1;
1129 int endc = -1; 1129 int endc = -1;
1130 int oldstartc = -1; 1130 int oldstartc = -1;
1131 int save_prev_at_start = prev_at_start;
1131 1132
1132 c = getchr(); 1133 c = getchr();
1133 switch (c) 1134 switch (c)
1134 { 1135 {
1135 case NUL: 1136 case NUL:
1465 c = getchr(); 1466 c = getchr();
1466 } 1467 }
1467 if (c == 'l' || c == 'c' || c == 'v') 1468 if (c == 'l' || c == 'c' || c == 'v')
1468 { 1469 {
1469 if (c == 'l') 1470 if (c == 'l')
1471 {
1470 /* \%{n}l \%{n}<l \%{n}>l */ 1472 /* \%{n}l \%{n}<l \%{n}>l */
1471 EMIT(cmp == '<' ? NFA_LNUM_LT : 1473 EMIT(cmp == '<' ? NFA_LNUM_LT :
1472 cmp == '>' ? NFA_LNUM_GT : NFA_LNUM); 1474 cmp == '>' ? NFA_LNUM_GT : NFA_LNUM);
1475 if (save_prev_at_start)
1476 at_start = TRUE;
1477 }
1473 else if (c == 'c') 1478 else if (c == 'c')
1474 /* \%{n}c \%{n}<c \%{n}>c */ 1479 /* \%{n}c \%{n}<c \%{n}>c */
1475 EMIT(cmp == '<' ? NFA_COL_LT : 1480 EMIT(cmp == '<' ? NFA_COL_LT :
1476 cmp == '>' ? NFA_COL_GT : NFA_COL); 1481 cmp == '>' ? NFA_COL_GT : NFA_COL);
1477 else 1482 else