summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-29 21:05:48 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-29 21:05:48 +0100
commita86f14a923d9a242107c16d0852f61f3daf985a8 (patch)
tree568efae89bd963460c4e0032b54b31911f898115 /src/eval.c
parentfdcc9afb71ea88fe63bbed8bad0d5bae607bfb73 (diff)
downloadvim-git-a86f14a923d9a242107c16d0852f61f3daf985a8.tar.gz
patch 7.4.1461v7.4.1461
Problem: When starting job on MS-Windows all parts of the command are put in quotes. Solution: Only use quotes when needed. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index a208b2a72..a45b71de5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -15137,7 +15137,8 @@ f_job_start(typval_T *argvars UNUSED, typval_T *rettv)
#ifdef USE_ARGV
argv[argc++] = (char *)s;
#else
- if (li != l->lv_first)
+ /* Only escape when needed, double quotes are not always allowed. */
+ if (li != l->lv_first && vim_strpbrk(s, (char_u *)" \t\"") != NULL)
{
s = vim_strsave_shellescape(s, FALSE, TRUE);
if (s == NULL)