mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.233
Problem: Escaping special characters for using "%" with a shell command is inconsistant: parentheses are escaped but spaces are not. Solution: Only escape "!". (Gary Johnson) https://code.google.com/p/vim/source/detail?r=22a1d5762ba3a75984e89dcc47a65498f63a6c2c
This commit is contained in:
parent
0e1e9148a3
commit
54f425adc5
@ -3704,21 +3704,13 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **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 *)"!&;()<>");
|
l = vim_strsave_escaped(repl, (char_u *)"!");
|
||||||
if (l != NULL) {
|
if (l != NULL) {
|
||||||
vim_free(repl);
|
vim_free(repl);
|
||||||
repl = l;
|
repl = l;
|
||||||
/* For a sh-like shell escape "!" another time. */
|
|
||||||
if (strstr((char *)p_sh, "sh") != NULL) {
|
|
||||||
l = vim_strsave_escaped(repl, (char_u *)"!");
|
|
||||||
if (l != NULL) {
|
|
||||||
vim_free(repl);
|
|
||||||
repl = l;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ static int included_patches[] = {
|
|||||||
//236,
|
//236,
|
||||||
//235,
|
//235,
|
||||||
//234,
|
//234,
|
||||||
//233,
|
233,
|
||||||
232,
|
232,
|
||||||
//231,
|
//231,
|
||||||
//230,
|
//230,
|
||||||
|
Loading…
Reference in New Issue
Block a user