summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-07-18 16:33:58 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-07-18 16:33:58 +0900
commit7727ad43afb57cb325439590a9a6bad94601a720 (patch)
treebe514e8c809005104c6c99a322c5b28c552e600d /plugin/fzf.vim
parentbbe10f4f7745000c121b629ff68e81bba5a497f6 (diff)
downloadfzf-7727ad43afb57cb325439590a9a6bad94601a720.tar.gz
[vim] Use fnameescape to escape command line arguments
Fix https://github.com/junegunn/fzf.vim/issues/404 Thanks to @janlazo.
Diffstat (limited to 'plugin/fzf.vim')
-rw-r--r--plugin/fzf.vim9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 24427bed..3beb5be3 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -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