summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-06-09 12:00:59 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-06-09 12:00:59 +0900
commit5efdeccdbbf9dba6296f16de65efc6c4ad3a22a9 (patch)
tree714e7ceccfbd7fb35a2ae77492e56712f02d39e6 /plugin
parent050777b8c4ad94a9d1821cdd6868d1b59bcd7ec3 (diff)
[vim] Expand 'dir' on Cygwin to handle Windows-style paths
See https://github.com/junegunn/fzf/pull/933#discussion_r120011934 Close https://github.com/junegunn/fzf.vim/pull/386
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 99fda1f1..bad74490 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -361,6 +361,9 @@ try
if has('nvim') && !has_key(dict, 'dir')
let dict.dir = s:fzf_getcwd()
endif
+ if has('win32unix') && has_key(dict, 'dir')
+ let dict.dir = fnamemodify(dict.dir, ':p')
+ endif
if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND)
let temps.source = s:fzf_tempname().(s:is_win ? '.bat' : '')
@@ -765,8 +768,6 @@ function! s:cmd(bang, ...) abort
let opts.dir = substitute(substitute(remove(args, -1), '\\\(["'']\)', '\1', 'g'), '[/\\]*$', '/', '')
if s:is_win && !&shellslash
let opts.dir = substitute(opts.dir, '/', '\\', 'g')
- elseif has('win32unix')
- let opts.dir = fnamemodify(opts.dir, ':p')
endif
let prompt = opts.dir
else