|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.233
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.233
|
|
|
3ef2ca |
Problem: Escaping special characters for using "%" with a shell command is
|
|
|
3ef2ca |
inconsistant, parenthesis are escaped but spaces are not.
|
|
|
3ef2ca |
Solution: Only escape "!". (Gary Johnson)
|
|
|
3ef2ca |
Files: src/ex_docmd.c
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.232/src/ex_docmd.c 2014-04-01 17:49:40.140891378 +0200
|
|
|
3ef2ca |
--- src/ex_docmd.c 2014-04-01 18:26:16.036861171 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 4580,4604 ****
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/* For a shell command a '!' must be escaped. */
|
|
|
3ef2ca |
if ((eap->usefilter || eap->cmdidx == CMD_bang)
|
|
|
3ef2ca |
! && vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
char_u *l;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
! l = vim_strsave_escaped(repl, (char_u *)"!&;()<>");
|
|
|
3ef2ca |
if (l != NULL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
vim_free(repl);
|
|
|
3ef2ca |
repl = l;
|
|
|
3ef2ca |
- /* For a sh-like shell escape "!" another time. */
|
|
|
3ef2ca |
- if (strstr((char *)p_sh, "sh") != NULL)
|
|
|
3ef2ca |
- {
|
|
|
3ef2ca |
- l = vim_strsave_escaped(repl, (char_u *)"!");
|
|
|
3ef2ca |
- if (l != NULL)
|
|
|
3ef2ca |
- {
|
|
|
3ef2ca |
- vim_free(repl);
|
|
|
3ef2ca |
- repl = l;
|
|
|
3ef2ca |
- }
|
|
|
3ef2ca |
- }
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--- 4580,4594 ----
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/* For a shell command a '!' must be escaped. */
|
|
|
3ef2ca |
if ((eap->usefilter || eap->cmdidx == CMD_bang)
|
|
|
3ef2ca |
! && vim_strpbrk(repl, (char_u *)"!") != NULL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
char_u *l;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
! l = vim_strsave_escaped(repl, (char_u *)"!");
|
|
|
3ef2ca |
if (l != NULL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
vim_free(repl);
|
|
|
3ef2ca |
repl = l;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.232/src/version.c 2014-04-01 17:49:40.144891378 +0200
|
|
|
3ef2ca |
--- src/version.c 2014-04-01 18:54:13.276838100 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 736,737 ****
|
|
|
3ef2ca |
--- 736,739 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 233,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
hundred-and-one symptoms of being an internet addict:
|
|
|
3ef2ca |
17. You turn on your intercom when leaving the room so you can hear if new
|
|
|
3ef2ca |
e-mail arrives.
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|