]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.360 v7.4.360
authorBram Moolenaar <Bram@vim.org>
Wed, 9 Jul 2014 17:32:34 +0000 (19:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 9 Jul 2014 17:32:34 +0000 (19:32 +0200)
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)

src/regexp.c
src/version.c

index 26fb813c87d73e50a8561c875107c1878ce5fcb9..dcb9a3b4e8e07ec7f42f6df18e2e39d90983c06d 100644 (file)
@@ -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('$');
            }
index faaaf76ad6f59f22c73d985370d834c46b8bab4d..9867e7f0a5ed04ed0a1e91a49e69e5a14cdea2af 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    360,
 /**/
     359,
 /**/