Skip to content

Commit

Permalink
updated for version 7.4.360
Browse files Browse the repository at this point in the history
Problem:    In a regexp pattern a "$" followed by \v or \V is not seen as the
            end-of-line.
Solution:   Handle the situation. (Ozaki Kiichi)
  • Loading branch information
brammool committed Jul 9, 2014
1 parent 0d1e8c1 commit ff65ac8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/regexp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3109,15 +3109,25 @@ peekchr()
if (reg_magic >= MAGIC_OFF)
{
char_u *p = regparse + 1;
int is_magic_all = (reg_magic == MAGIC_ALL);

/* ignore \c \C \m and \M after '$' */
/* ignore \c \C \m \M \v \V and \Z after '$' */
while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C'
|| p[1] == 'm' || p[1] == 'M' || p[1] == 'Z'))
|| p[1] == 'm' || p[1] == 'M'
|| p[1] == 'v' || p[1] == 'V' || p[1] == 'Z'))
{
if (p[1] == 'v')
is_magic_all = TRUE;
else if (p[1] == 'm' || p[1] == 'M' || p[1] == 'V')
is_magic_all = FALSE;
p += 2;
}
if (p[0] == NUL
|| (p[0] == '\\'
&& (p[1] == '|' || p[1] == '&' || p[1] == ')'
|| p[1] == 'n'))
|| (is_magic_all
&& (p[0] == '|' || p[0] == '&' || p[0] == ')'))
|| reg_magic == MAGIC_ALL)
curchr = Magic('$');
}
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
360,
/**/
359,
/**/
Expand Down

0 comments on commit ff65ac8

Please sign in to comment.