[vim] Use fnameescape to escape command line arguments

Fix https://github.com/junegunn/fzf.vim/issues/404

Thanks to @janlazo.
This commit is contained in:
Junegunn Choi
2017-07-18 16:33:58 +09:00
parent bbe10f4f77
commit 7727ad43af

View File

@@ -149,13 +149,8 @@ function! s:tmux_enabled()
endfunction
function! s:escape(path)
let escaped_chars = '$%#''"'
if has('unix')
let escaped_chars .= ' \'
endif
return escape(a:path, escaped_chars)
let path = fnameescape(a:path)
return s:is_win ? escape(path, '$') : path
endfunction
" Upgrade legacy options