summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2013-11-20 10:46:53 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2013-11-20 10:46:53 +0900
commit2540c9062f823e43b0129d6a27e83298fdfad08d (patch)
tree75ef21faee9e2bd3686c459f32c18bf125ad512f /plugin/fzf.vim
parentf28274109f13092ccd0df2be5da54a39936fadb4 (diff)
downloadfzf-2540c9062f823e43b0129d6a27e83298fdfad08d.tar.gz
The last argument doesn't have to be a path
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