summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2013-11-01 16:07:46 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2013-11-01 16:07:46 +0900
commitfd2472d11c39b353e2e245be32b68e8064e0565d (patch)
tree158cbbca29f332ce4aeaec1dd15d4fb5b8e89fa4
parent311c4a36e28fcfcc3406993be4c0f27f54c19b66 (diff)
downloadfzf-fd2472d11c39b353e2e245be32b68e8064e0565d.tar.gz
Ignore empty file path
-rw-r--r--plugin/fzf.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index de1e6290..685386e3 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -29,7 +29,10 @@ function! s:fzf(args)
let prefix = exists('g:fzf_command') ? g:fzf_command.'|' : ''
execute "silent !".prefix."/usr/bin/env ruby ".s:exec." ".a:args." > ".tf
if !v:shell_error
- execute 'silent e '.join(readfile(tf), '')
+ let file = join(readfile(tf), '')
+ if !empty(file)
+ execute 'silent e '.file
+ endif
endif
finally
silent! call delete(tf)