]> granicus.if.org Git - vim/commitdiff
updated for version 7.4b.005 v7.4b.005
authorBram Moolenaar <Bram@vim.org>
Fri, 2 Aug 2013 12:15:13 +0000 (14:15 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 2 Aug 2013 12:15:13 +0000 (14:15 +0200)
Problem:    Finding %s in shellpipe and shellredir does not ignore %%s.
Solution:   Skip over %%. (lcd 47)

src/ex_cmds.c
src/version.c

index 66e170208332e3c48292b5dec41058a3646e8d49..cc4cedf2e4f8df9d1065ea883243262d244edd4f 100644 (file)
@@ -1622,10 +1622,14 @@ append_redir(buf, buflen, opt, fname)
     char_u     *end;
 
     end = buf + STRLEN(buf);
-    /* find "%s", skipping "%%" */
+    /* find "%s" */
     for (p = opt; (p = vim_strchr(p, '%')) != NULL; ++p)
-       if (p[1] == 's')
+    {
+       if (p[1] == 's') /* found %s */
            break;
+       if (p[1] == '%') /* skip %% */
+           ++p;
+    }
     if (p != NULL)
     {
        *end = ' '; /* not really needed? Not with sh, ksh or bash */
index 7ccb9315399731210ee3cd2e9dd004d929e64ebe..ec2c2c0002c3525b4a900d9bfb4830866411e475 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5,
 /**/
     4,
 /**/