changeset 5257:e63e4b4be923 v7.4b.005

updated for version 7.4b.005 Problem: Finding %s in shellpipe and shellredir does not ignore %%s. Solution: Skip over %%. (lcd 47)
author Bram Moolenaar <bram@vim.org>
date Fri, 02 Aug 2013 14:15:13 +0200
parents 74301ef4297a
children 01452b8a075a
files src/ex_cmds.c src/version.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -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 */
--- a/src/version.c
+++ b/src/version.c
@@ -728,6 +728,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    5,
+/**/
     4,
 /**/
     3,