summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 0bbeaff9..21b7d66b 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -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)