Explorar o código

Add `buf.isdir` to efficiently track whether buffer is a directory.

Michael Henry hai 11 meses
pai
achega
dce64d5e32
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      plugin/bufexplorer.vim

+ 2 - 1
plugin/bufexplorer.vim

@@ -718,7 +718,8 @@ function! s:GetBufferInfo(bufnr)
             let b[key] = fnamemodify(name, val)
         endfor
 
-        if getftype(b.fullname) == "dir" && g:bufExplorerShowDirectories == 1
+        let b.isdir = getftype(b.fullname) == "dir"
+        if b.isdir && g:bufExplorerShowDirectories == 1
             let b.shortname = "<DIRECTORY>"
         endif