Commits

Takeshi NISHIDA  committed 11e1aa6

Fixed a bug that buffers which had been opened weren't listed in Coverage-File mode

  • Participants
  • Parent commits 9f3744d

Comments (0)

Files changed (2)

File autoload/fuf/coveragefile.vim

   if !exists('s:cache[key]')
     let s:cache[key] = l9#concat(map(copy(g:fuf_coveragefile_globPatterns),
           \                          'fuf#glob(v:val)'))
-    call filter(s:cache[key], 'filereadable(v:val)')
+    call filter(s:cache[key], 'filereadable(v:val)') " filter out directories
     call map(s:cache[key], 'fuf#makePathItem(fnamemodify(v:val, ":~:."), "", 0)')
     if len(g:fuf_coveragefile_exclude)
       call filter(s:cache[key], 'v:val.word !~ g:fuf_coveragefile_exclude')
 function s:handler.onModeEnterPost()
   " NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
   let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':~:.')
-  let self.items = s:enumItems()
-  call filter(self.items, '!empty(v:val) && v:val.word !=# bufNamePrev')
+  let self.items = copy(s:enumItems())
+  call filter(self.items, 'v:val.word !=# bufNamePrev')
 endfunction
 
 "
 CHANGELOG                                                      *fuf-changelog*
 
 4.2.1:
+  - Fixed a bug that buffers which had been opened weren't listed in
+    Coverage-File mode
   - Fixed a bug that tag entries including tab characters weren't parsed
     correctly in Coverage-File mode