mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 04:45:14 +00:00
[vim] Use iconv only if +iconv is enabled (#1813)
This commit is contained in:
parent
577024f1e9
commit
e21b001116
@ -49,8 +49,13 @@ if s:is_win
|
||||
|
||||
" Use utf-8 for fzf.vim commands
|
||||
" Return array of shell commands for cmd.exe
|
||||
let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0)
|
||||
function! s:enc_to_cp(str)
|
||||
if !has('iconv')
|
||||
return a:str
|
||||
endif
|
||||
if !exists('s:codepage')
|
||||
let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0)
|
||||
endif
|
||||
return iconv(a:str, &encoding, 'cp'.s:codepage)
|
||||
endfunction
|
||||
function! s:wrap_cmds(cmds)
|
||||
|
Loading…
Reference in New Issue
Block a user