Fix extra space in win32 environment variables

Closes https://github.com/tpope/vim-fugitive/issues/1271
This commit is contained in:
Tim Pope 2019-07-01 17:58:33 -04:00
parent 0d6ffcc3a9
commit 461c1beefa

View File

@ -285,7 +285,7 @@ function! fugitive#Prepare(...) abort
let var = get(s:prepare_env, tolower(key), key)
let val = matchstr(cmd[i+1], '=\zs.*')
if s:winshell()
let pre .= 'set ' . var . '=' . s:shellesc(val) . ' & '
let pre .= 'set ' . var . '=' . s:shellesc(val) . '& '
else
let pre = (len(pre) ? pre : 'env ') . var . '=' . s:shellesc(val) . ' '
endif
@ -2695,7 +2695,7 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args
endif
let cdback = s:Cd(tree)
if s:winshell()
let command = 'set GIT_EDITOR=false & '
let command = 'set GIT_EDITOR=false& '
else
let command = 'env GIT_EDITOR=false '
endif