summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-07-09 19:32:34 +0200
committerBram Moolenaar <Bram@vim.org>2014-07-09 19:32:34 +0200
commitff65ac84fd54549086098896678211455f767f02 (patch)
tree8880d036076944d6f8ff322b226c020bb7d0df84
parent0d1e8c12034ae51b4f31cbe81534df491b837028 (diff)
downloadvim-git-ff65ac84fd54549086098896678211455f767f02.tar.gz
updated for version 7.4.360v7.4.360
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)
-rw-r--r--src/regexp.c14
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 2 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 26fb813c8..dcb9a3b4e 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -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('$');
}
diff --git a/src/version.c b/src/version.c
index faaaf76ad..9867e7f0a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 360,
+/**/
359,
/**/
358,