changeset 8508:13e5a1f02be4 v7.4.1544

commit https://github.com/vim/vim/commit/583c1f14a4e1d89fe029b1c134d405357468ece7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 12 15:58:34 2016 +0100 patch 7.4.1544 Problem: On Win32 escaping the command does not work properly. Solution: Reset 'ssl' when escaping the command. (Yasuhiro Matsumoto)
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Mar 2016 16:00:05 +0100
parents 6ef0a1555062
children 10f405d5daba
files src/channel.c src/version.c
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -3625,7 +3625,17 @@ job_start(typval_T *argvars)
 	    /* Only escape when needed, double quotes are not always allowed. */
 	    if (li != l->lv_first && vim_strpbrk(s, (char_u *)" \t\"") != NULL)
 	    {
+# ifdef WIN32
+		int old_ssl = p_ssl;
+
+		/* This is using CreateProcess, not cmd.exe.  Always use
+		 * double quote and backslashes. */
+		p_ssl = 0;
+# endif
 		s = vim_strsave_shellescape(s, FALSE, TRUE);
+# ifdef WIN32
+		p_ssl = old_ssl;
+# endif
 		if (s == NULL)
 		    goto theend;
 		ga_concat(&ga, s);
--- a/src/version.c
+++ b/src/version.c
@@ -744,6 +744,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1544,
+/**/
     1543,
 /**/
     1542,