# HG changeset patch # User Bram Moolenaar # Date 1396371288 -7200 # Node ID 22a1d5762ba3a75984e89dcc47a65498f63a6c2c # Parent 5bd7c9d7e026e040f331af05995ed24053d03253 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) diff --git a/src/ex_docmd.c b/src/ex_docmd.c --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4580,25 +4580,15 @@ expand_filename(eap, cmdlinep, errormsgp /* For a shell command a '!' must be escaped. */ if ((eap->usefilter || eap->cmdidx == CMD_bang) - && vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL) + && vim_strpbrk(repl, (char_u *)"!") != NULL) { char_u *l; - l = vim_strsave_escaped(repl, (char_u *)"!&;()<>"); + 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 *)"!"); - if (l != NULL) - { - vim_free(repl); - repl = l; - } - } } } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 233, +/**/ 232, /**/ 231,