[neovim] Set 'dir' to the current direcotry

Close https://github.com/junegunn/fzf.vim/issues/308
This commit is contained in:
Junegunn Choi 2017-02-25 23:52:56 +09:00
parent 0b940e4b2b
commit cd59e5d07b
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -290,6 +290,10 @@ try
throw v:exception
endtry
if has('nvim') && !has_key(dict, 'dir')
let dict.dir = getcwd()
endif
if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND)
let temps.source = tempname().(s:is_win ? '.bat' : '')
call writefile((s:is_win ? ['@echo off'] : []) + split($FZF_DEFAULT_COMMAND, "\n"), temps.source)