This commit is contained in:
Junegunn Choi 2020-10-27 23:53:25 +09:00
parent 407205e52b
commit de3d09fe79
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -50,9 +50,6 @@ if s:is_win
" Use utf-8 for fzf.vim commands " Use utf-8 for fzf.vim commands
" Return array of shell commands for cmd.exe " Return array of shell commands for cmd.exe
function! s:enc_to_cp(str) function! s:enc_to_cp(str)
if s:is_win && has('gui')
return iconv(a:str, 'utf-8', &encoding)
endif
if !has('iconv') if !has('iconv')
return a:str return a:str
endif endif
@ -407,7 +404,7 @@ try
let prefix = '( '.source.' )|' let prefix = '( '.source.' )|'
elseif type == 3 elseif type == 3
let temps.input = s:fzf_tempname() let temps.input = s:fzf_tempname()
call writefile(map(source, '<SID>enc_to_cp(v:val)'), temps.input) call writefile(source, temps.input)
let prefix = (s:is_win ? 'type ' : 'cat ').fzf#shellescape(temps.input).'|' let prefix = (s:is_win ? 'type ' : 'cat ').fzf#shellescape(temps.input).'|'
else else
throw 'Invalid source type' throw 'Invalid source type'