Skip to content
Snippets Groups Projects
Commit e21b0011 authored by Jan Edmund Lazo's avatar Jan Edmund Lazo Committed by Junegunn Choi
Browse files

[vim] Use iconv only if +iconv is enabled (#1813)

parent 577024f1
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment