diff -r 03e01f56c7f2 src/dosinst.c
--- a/src/dosinst.c Wed Nov 13 21:56:24 2013 -0600
+++ b/src/dosinst.c Thu Nov 14 23:35:20 2013 -0600
@@ -1192,23 +1192,29 @@
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");
}
On Thursday, November 14, 2013 11:31:14 AM UTC-6, Ben Fritz wrote:
> On Wednesday, November 13, 2013 9:48:35 PM UTC-6, Michael Chu wrote:
> > I had the same problem as "star...@gmail.com" after installing Vim on my work laptop running Windows 7, and the solution posted by the user worked for me.
> >
> > It was the default _vimrc that I modified to get vimdiff to work properly.
>
> The dosinst.c file creates the default _vimrc file, and contains an issue where there is an old workaround for calling an external program at a path containing spaces. But this old workaround fails with the new default value of shellxquote from the middle of the 7.3 patches. It needs an update.
>
> For now you can remove the logic to add an extra pair of quotes around the entire command, or temporarily set shellxquote to empty inside that function and restore it at the end of the function.
I think this patch fixes the installer.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thursday, November 14, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment