]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.103 v7.4.103
authorBram Moolenaar <Bram@vim.org>
Thu, 21 Nov 2013 17:13:37 +0000 (18:13 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 21 Nov 2013 17:13:37 +0000 (18:13 +0100)
Problem:    Dos installer uses an old way to escape spaces in the diff
            command.
Solution:   Adjust the quoting to the new default shellxquote. (Ben Fritz)

src/dosinst.c
src/version.c

index 3fbfb5c5c2e13c84d06048c0470a6e935555e416..5b54380fe75fcc43b3b0a2e3b6fc66da4cdf2f39 100644 (file)
@@ -1192,23 +1192,29 @@ install_vimrc(int idx)
        fprintf(fd, "  if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
 
        /* If the path has a space:  When using cmd.exe (Win NT/2000/XP) put
-        * quotes around the whole command and around the diff command.
+        * quotes around the diff command and rely on the default value of
+         * shellxquote to solve the quoting problem for the whole command.
+         *
         * Otherwise put a double quote just before the space and at the
         * end of the command.  Putting quotes around the whole thing
         * doesn't work on Win 95/98/ME.  This is mostly guessed! */
-       fprintf(fd, "  let eq = ''\n");
        fprintf(fd, "  if $VIMRUNTIME =~ ' '\n");
        fprintf(fd, "    if &sh =~ '\\<cmd'\n");
-       fprintf(fd, "      let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n");
-       fprintf(fd, "      let eq = '\"'\n");
+       fprintf(fd, "      if empty(&shellxquote)\n");
+       fprintf(fd, "        let l:shxq_sav = ''\n");
+       fprintf(fd, "        set shellxquote&\n");
+       fprintf(fd, "      endif\n");
+       fprintf(fd, "      let cmd = '\"' . $VIMRUNTIME . '\\diff\"'\n");
        fprintf(fd, "    else\n");
        fprintf(fd, "      let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
        fprintf(fd, "    endif\n");
        fprintf(fd, "  else\n");
        fprintf(fd, "    let cmd = $VIMRUNTIME . '\\diff'\n");
        fprintf(fd, "  endif\n");
-       fprintf(fd, "  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq\n");
-
+       fprintf(fd, "  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n");
+       fprintf(fd, "  if exists('l:shxq_sav')\n");
+       fprintf(fd, "    let &shellxquote=l:shxq_sav\n");
+       fprintf(fd, "  endif\n");
        fprintf(fd, "endfunction\n");
        fprintf(fd, "\n");
     }
index 4a0538707ed83540091f0ffedb718a779d2cc6a4..d8f95dd472af6a7be71e45396926cfcbb3400902 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    103,
 /**/
     102,
 /**/