Mercurial > vim
changeset 8789:667da8443275 v7.4.1683
commit https://github.com/vim/vim/commit/e609ad557c15e3e5d1e9ace2c578f48c5589c488
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 28 23:05:48 2016 +0200
patch 7.4.1683
Problem: Generated .bat files do not support --nofork.
Solution: Add check for --nofork. Also add "setlocal". (Kevin Cant?,
closes https://github.com/vim/vim/issues/659)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 28 Mar 2016 23:15:04 +0200 |
parents | c29f6fad5319 |
children | 42f09c7a3597 |
files | src/dosinst.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dosinst.c +++ b/src/dosinst.c @@ -762,6 +762,7 @@ install_bat_choice(int idx) fprintf(fd, "@echo off\n"); fprintf(fd, "rem -- Run Vim --\n"); fprintf(fd, "\n"); + fprintf(fd, "setlocal\n"); /* Don't use double quotes for the "set" argument, also when it * contains a space. The quotes would be included in the value @@ -793,6 +794,9 @@ install_bat_choice(int idx) fprintf(fd, "if .%%1==. goto loopend\n"); if (*exename == 'g') { + fprintf(fd, "if NOT .%%1==.--nofork goto noforklongarg\n"); + fprintf(fd, "set VIMNOFORK=1\n"); + fprintf(fd, ":noforklongarg\n"); fprintf(fd, "if NOT .%%1==.-f goto noforkarg\n"); fprintf(fd, "set VIMNOFORK=1\n"); fprintf(fd, ":noforkarg\n");