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)
Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test36.in,
src/testdir/test36.ok
*** ../vim-7.4.1304/src/regexp.c 2016-01-30 20:31:21.253607872 +0100
--- src/regexp.c 2016-02-12 19:06:27.180846207 +0100
***************
*** 1500,1505 ****
--- 1500,1509 ----
}
#endif
+ /* variables for parsing reginput */
+ static int at_start; /* True when on the first character */
+ static int prev_at_start; /* True when on the second character */
+
/*
* Parse regular expression, i.e. main body or parenthesized thing.
*
***************
*** 1918,1923 ****
--- 1922,1928 ----
int c;
char_u *p;
int extra = 0;
+ int save_prev_at_start = prev_at_start;
*flagp = WORST; /* Tentatively. */
***************
*** 2331,2337 ****
--- 2336,2346 ----
else if (c == 'l' || c == 'c' || c == 'v')
{
if (c == 'l')
+ {
ret = regnode(RE_LNUM);
+ if (save_prev_at_start)
+ at_start = TRUE;
+ }
else if (c == 'c')
ret = regnode(RE_COL);
else
***************
*** 2946,2955 ****
/*
* Functions for getting characters from the regexp input.
*/
-
- static int at_start; /* True when on the first character */
- static int prev_at_start; /* True when on the second character */
-
/*
* Start parsing at "str".
*/
--- 2955,2960 ----
*** ../vim-7.4.1304/src/regexp_nfa.c 2016-01-30 20:31:21.253607872 +0100
--- src/regexp_nfa.c 2016-02-12 19:06:17.296949480 +0100
***************
*** 1128,1133 ****
--- 1128,1134 ----
int startc = -1;
int endc = -1;
int oldstartc = -1;
+ int save_prev_at_start = prev_at_start;
c = getchr();
switch (c)
***************
*** 1467,1475 ****
--- 1468,1480 ----
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 :
*** ../vim-7.4.1304/src/testdir/test36.in 2013-06-04 17:38:14.000000000
+0200
--- src/testdir/test36.in 2016-02-12 12:44:23.782579327 +0100
***************
*** 98,103 ****
--- 98,106 ----
p:s/\%#=0[^A-Z]//g
p:s/\%#=1[^A-Z]//g
p:s/\%#=2[^A-Z]//g
+ p:s/\%#=0\%204l^\t...//g
+ p:s/\%#=1\%205l^\t...//g
+ p:s/\%#=2\%206l^\t...//g
:/^start-here/+1,$wq! test.out
ENDTEST
*** ../vim-7.4.1304/src/testdir/test36.ok 2013-06-04 17:38:14.000000000
+0200
--- src/testdir/test36.ok 2016-02-12 12:45:52.621656151 +0100
***************
*** 94,96 ****
--- 94,99 ----
ABCDEFGHIXYZ
ABCDEFGHIXYZ
ABCDEFGHIXYZ
+ !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé
+ !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé
+ !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé
*** ../vim-7.4.1304/src/version.c 2016-02-11 21:08:27.544531244 +0100
--- src/version.c 2016-02-12 19:07:49.987981050 +0100
***************
*** 749,750 ****
--- 749,752 ----
{ /* Add new patch number below this line */
+ /**/
+ 1305,
/**/
--
hundred-and-one symptoms of being an internet addict:
236. You start saving URL's in your digital watch.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.