Ignore empty file path

pull/4/head
Junegunn Choi 11 years ago
parent 311c4a36e2
commit fd2472d11c

@ -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)

Loading…
Cancel
Save