소스 검색

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

Michael Henry 11 달 전
부모
커밋
dce64d5e32
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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