Skip to content

Commit e609ad5

Browse files
committed
patch 7.4.1683
Problem: Generated .bat files do not support --nofork. Solution: Add check for --nofork. Also add "setlocal". (Kevin Cantú, closes #659)
1 parent 72188e9 commit e609ad5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/dosinst.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ install_bat_choice(int idx)
762762
fprintf(fd, "@echo off\n");
763763
fprintf(fd, "rem -- Run Vim --\n");
764764
fprintf(fd, "\n");
765+
fprintf(fd, "setlocal\n");
765766

766767
/* Don't use double quotes for the "set" argument, also when it
767768
* contains a space. The quotes would be included in the value
@@ -793,6 +794,9 @@ install_bat_choice(int idx)
793794
fprintf(fd, "if .%%1==. goto loopend\n");
794795
if (*exename == 'g')
795796
{
797+
fprintf(fd, "if NOT .%%1==.--nofork goto noforklongarg\n");
798+
fprintf(fd, "set VIMNOFORK=1\n");
799+
fprintf(fd, ":noforklongarg\n");
796800
fprintf(fd, "if NOT .%%1==.-f goto noforkarg\n");
797801
fprintf(fd, "set VIMNOFORK=1\n");
798802
fprintf(fd, ":noforkarg\n");

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1683,
751753
/**/
752754
1682,
753755
/**/

0 commit comments

Comments
 (0)