summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/fzf.vim')
-rw-r--r--plugin/fzf.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 69ca19b9..0a18d22e 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -31,7 +31,7 @@ function! fzf#run(command, ...)
let cwd = getcwd()
try
let args = copy(a:000)
- if len(args) > 0
+ if len(args) > 0 && isdirectory(expand(args[-1]))
let dir = remove(args, -1)
execute 'chdir '.s:escape(dir)
endif