diff --git a/autoload/nerdtree.vim b/autoload/nerdtree.vim index bbf6087..b0eb103 100644 --- a/autoload/nerdtree.vim +++ b/autoload/nerdtree.vim @@ -24,10 +24,13 @@ function! nerdtree#checkForBrowse(dir) call g:NERDTreeCreator.CreateWindowTree(a:dir) endfunction +"FUNCTION: s:reuseWin(dir) {{{2 +"finds a NERDTree buffer with root of dir, and opens it. function! s:reuseWin(dir) abort let path = g:NERDTreePath.New(fnamemodify(a:dir, ":p")) for i in range(1, bufnr("$")) + unlet! nt let nt = getbufvar(i, "NERDTree") if empty(nt) continue