From fd2472d11c39b353e2e245be32b68e8064e0565d Mon Sep 17 00:00:00 2001
From: Junegunn Choi <junegunn.c@gmail.com>
Date: Fri, 1 Nov 2013 16:07:46 +0900
Subject: [PATCH] Ignore empty file path

---
 plugin/fzf.vim | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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)