[vim] Use CRLF in batchfile for multibyte codepage (#1289)

Close #1288
This commit is contained in:
Jan Edmund Lazo 2018-05-13 03:24:28 -04:00 committed by Junegunn Choi
parent b8296a91b9
commit cce17ad0a0
1 changed files with 2 additions and 2 deletions

View File

@ -50,9 +50,9 @@ if s:is_win
" Use utf-8 for fzf.vim commands
" Return array of shell commands for cmd.exe
function! s:wrap_cmds(cmds)
return ['@echo off', 'for /f "tokens=4" %%a in (''chcp'') do set origchcp=%%a', 'chcp 65001 > nul'] +
return map(['@echo off', 'for /f "tokens=4" %%a in (''chcp'') do set origchcp=%%a', 'chcp 65001 > nul'] +
\ (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) +
\ ['chcp %origchcp% > nul']
\ ['chcp %origchcp% > nul'], 'v:val."\r"')
endfunction
else
let s:term_marker = ";#FZF"