Commits

Anonymous committed 04d8148

changed to check filereadable() in update_info() for MRU-File mode

Comments (0)

Files changed (1)

plugin/fuzzyfinder.vim

 endfunction
 
 function! g:FuzzyFinderMode.MruFile.on_mode_enter()
-  let self.cache = filter(copy(self.info), 'filereadable(v:val.path)')
+  let self.cache = copy(self.info)
+  "let self.cache = filter(self.cache, 'filereadable(v:val.path)')
   let self.cache = map(self.cache, '{ "path" : fnamemodify(v:val.path, ":~:."), "time" : strftime(self.time_format, v:val.time) }')
   let self.cache = filter(self.cache, 'bufnr(v:val.path) != self.prev_bufnr')
   let self.cache = s:ExtendIndexToEach(self.cache, 1)
 endfunction
 
 function! g:FuzzyFinderMode.MruFile.update_info()
-  if !empty(&buftype)
+  if !empty(&buftype) || !filereadable(expand('%'))
     return
   endif
   call s:InfoFileManager.load()
 
   if !bufexists(self.buf_nr)
     leftabove 1new
-    file \[Fuzzyfinder]
+    file `='[Fuzzyfinder]'`
     let self.buf_nr = bufnr('%')
   elseif bufwinnr(self.buf_nr) == -1
     leftabove 1split
 
 function! s:InfoFileManager.edit()
 
-  new +file\ [FuzzyfinderInfo]
+  new
+  file `='[FuzzyfinderInfo]'`
   let self.bufnr = bufnr('%')
 
   setlocal filetype=vim