PR #886: use delayed expansion
This commit is contained in:
parent
02af734b3c
commit
91a4de940a
4
plug.vim
4
plug.vim
|
@ -353,9 +353,9 @@ if s:is_win
|
|||
|
||||
" Copied from fzf
|
||||
function! s:wrap_cmds(cmds)
|
||||
return map(['@echo off', 'for /f "delims=: tokens=2" %%a in (''chcp'') do set origchcp=%%a', 'set origchcp=%origchcp: =%', 'chcp 65001 > nul'] +
|
||||
return map(['@echo off','setlocal enabledelayedexpansion','for /f "delims=: tokens=2" %%a in (''chcp'') do set origchcp=%%a','set origchcp=!origchcp: =!','chcp 65001 > nul'] +
|
||||
\ (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) +
|
||||
\ ['chcp %origchcp% > nul'], 'v:val."\r"')
|
||||
\ ['chcp !origchcp! > nul','setlocal disabledelayedexpansion'],'v:val."\r"')
|
||||
endfunction
|
||||
|
||||
function! s:batchfile(cmd)
|
||||
|
|
Loading…
Reference in New Issue
Block a user