Patch 8.0.1829
Problem: MS-Windows: script for vimdiff can't handle ! chars.
Solution: Escape the ! chars. (Hans Ginzel, closes #2896)
Files: src/dosinst.c
*** ../vim-8.0.1828/src/dosinst.c 2018-04-10 18:47:16.089527073 +0200
--- src/dosinst.c 2018-05-11 19:52:42.212634162 +0200
***************
*** 1197,1209 ****
fprintf(fd, " let opt = '-a --binary '\n");
fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' |
endif\n");
fprintf(fd, " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' |
endif\n");
! /* Use quotes only when needed, they may cause trouble. */
fprintf(fd, " let arg1 = v:fname_in\n");
fprintf(fd, " if arg1 =~ ' ' | let arg1 = '\"' . arg1 . '\"' |
endif\n");
fprintf(fd, " let arg2 = v:fname_new\n");
fprintf(fd, " if arg2 =~ ' ' | let arg2 = '\"' . arg2 . '\"' |
endif\n");
fprintf(fd, " let arg3 = v:fname_out\n");
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 diff command and rely on the default value of
--- 1197,1213 ----
fprintf(fd, " let opt = '-a --binary '\n");
fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' |
endif\n");
fprintf(fd, " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' |
endif\n");
! /* Use quotes only when needed, they may cause trouble.
! * Always escape "!". */
fprintf(fd, " let arg1 = v:fname_in\n");
fprintf(fd, " if arg1 =~ ' ' | let arg1 = '\"' . arg1 . '\"' |
endif\n");
+ fprintf(fd, " let arg1 = substitute(arg1, '!', '\\!', 'g')\n");
fprintf(fd, " let arg2 = v:fname_new\n");
fprintf(fd, " if arg2 =~ ' ' | let arg2 = '\"' . arg2 . '\"' |
endif\n");
+ fprintf(fd, " let arg2 = substitute(arg2, '!', '\\!', 'g')\n");
fprintf(fd, " let arg3 = v:fname_out\n");
fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' |
endif\n");
+ fprintf(fd, " let arg3 = substitute(arg3, '!', '\\!', 'g')\n");
/* If the path has a space: When using cmd.exe (Win NT/2000/XP) put
* quotes around the diff command and rely on the default value of
***************
*** 1225,1230 ****
--- 1229,1235 ----
fprintf(fd, " else\n");
fprintf(fd, " let cmd = $VIMRUNTIME . '\\diff'\n");
fprintf(fd, " endif\n");
+ fprintf(fd, " let cmd = substitute(cmd, '!', '\\!', 'g')\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");
*** ../vim-8.0.1828/src/version.c 2018-05-13 14:40:10.775608704 +0200
--- src/version.c 2018-05-13 14:44:07.158327044 +0200
***************
*** 763,764 ****
--- 763,766 ----
{ /* Add new patch number below this line */
+ /**/
+ 1829,
/**/
--
BEDEVERE: Look! It's the old man from scene 24 - what's he Doing here?
ARTHUR: He is the keeper of the Bridge. He asks each traveler five
questions ...
GALAHAD: Three questions.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.