[neovim] Set 'dir' to the current direcotry
Close https://github.com/junegunn/fzf.vim/issues/308
This commit is contained in:
parent
0b940e4b2b
commit
cd59e5d07b
@ -290,6 +290,10 @@ try
|
|||||||
throw v:exception
|
throw v:exception
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
|
if has('nvim') && !has_key(dict, 'dir')
|
||||||
|
let dict.dir = getcwd()
|
||||||
|
endif
|
||||||
|
|
||||||
if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND)
|
if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND)
|
||||||
let temps.source = tempname().(s:is_win ? '.bat' : '')
|
let temps.source = tempname().(s:is_win ? '.bat' : '')
|
||||||
call writefile((s:is_win ? ['@echo off'] : []) + split($FZF_DEFAULT_COMMAND, "\n"), temps.source)
|
call writefile((s:is_win ? ['@echo off'] : []) + split($FZF_DEFAULT_COMMAND, "\n"), temps.source)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user