0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

updated for version 7.4.233

Problem:    Escaping special characters for using "%" with a shell command is
            inconsistant, parenthesis are escaped but spaces are not.
Solution:   Only escape "!". (Gary Johnson)
This commit is contained in:
Bram Moolenaar
2014-04-01 18:54:48 +02:00
parent fd3fe98b78
commit 31b7d38611
2 changed files with 4 additions and 12 deletions

View File

@@ -4580,18 +4580,10 @@ expand_filename(eap, cmdlinep, errormsgp)
/* For a shell command a '!' must be escaped. */ /* For a shell command a '!' must be escaped. */
if ((eap->usefilter || eap->cmdidx == CMD_bang) if ((eap->usefilter || eap->cmdidx == CMD_bang)
&& vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL) && vim_strpbrk(repl, (char_u *)"!") != NULL)
{ {
char_u *l; char_u *l;
l = vim_strsave_escaped(repl, (char_u *)"!&;()<>");
if (l != NULL)
{
vim_free(repl);
repl = l;
/* For a sh-like shell escape "!" another time. */
if (strstr((char *)p_sh, "sh") != NULL)
{
l = vim_strsave_escaped(repl, (char_u *)"!"); l = vim_strsave_escaped(repl, (char_u *)"!");
if (l != NULL) if (l != NULL)
{ {
@@ -4599,8 +4591,6 @@ expand_filename(eap, cmdlinep, errormsgp)
repl = l; repl = l;
} }
} }
}
}
p = repl_cmdline(eap, p, srclen, repl, cmdlinep); p = repl_cmdline(eap, p, srclen, repl, cmdlinep);
vim_free(repl); vim_free(repl);

View File

@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
233,
/**/ /**/
232, 232,
/**/ /**/