summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-08-02 14:15:13 +0200
committerBram Moolenaar <Bram@vim.org>2013-08-02 14:15:13 +0200
commit542805a59df19db785dc631f174a15eec40911af (patch)
tree760be6374eef8a387c1ae53efeebb9395f1c156d
parenteec3e1e72a3d4e31c9b9546cd62fcff69c12ce29 (diff)
downloadvim-git-7.4b.005.tar.gz
updated for version 7.4b.005v7.4b.005
Problem: Finding %s in shellpipe and shellredir does not ignore %%s. Solution: Skip over %%. (lcd 47)
-rw-r--r--src/ex_cmds.c8
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 66e170208..cc4cedf2e 100644
--- 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 */
diff --git a/src/version.c b/src/version.c
index 7ccb93153..ec2c2c000 100644
--- 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,