From 407205e52ba3e4e0f51b94791b1ca63c81320dd6 Mon Sep 17 00:00:00 2001 From: nekowasabi Date: Tue, 27 Oct 2020 17:16:47 +0900 Subject: [PATCH 1/2] Fix: barbled multibyte text(exe. Japanese). --- plugin/fzf.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 83e1cef5..46b7dfc5 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -50,6 +50,9 @@ if s:is_win " Use utf-8 for fzf.vim commands " Return array of shell commands for cmd.exe function! s:enc_to_cp(str) + if s:is_win && has('gui') + return iconv(a:str, 'utf-8', &encoding) + endif if !has('iconv') return a:str endif From de3d09fe795e9185c1bcdedb13e612bbf4b3dfc3 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 27 Oct 2020 23:53:25 +0900 Subject: [PATCH 2/2] fixup --- plugin/fzf.vim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 46b7dfc5..7dc677f4 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -50,9 +50,6 @@ if s:is_win " Use utf-8 for fzf.vim commands " Return array of shell commands for cmd.exe function! s:enc_to_cp(str) - if s:is_win && has('gui') - return iconv(a:str, 'utf-8', &encoding) - endif if !has('iconv') return a:str endif @@ -407,7 +404,7 @@ try let prefix = '( '.source.' )|' elseif type == 3 let temps.input = s:fzf_tempname() - call writefile(map(source, 'enc_to_cp(v:val)'), temps.input) + call writefile(source, temps.input) let prefix = (s:is_win ? 'type ' : 'cat ').fzf#shellescape(temps.input).'|' else throw 'Invalid source type'