diff --git a/lib/nerdtree/creator.vim b/lib/nerdtree/creator.vim index a893c17..5eac168 100644 --- a/lib/nerdtree/creator.vim +++ b/lib/nerdtree/creator.vim @@ -96,8 +96,7 @@ function! s:Creator.createWindowTree(dir) "we need a unique name for each window tree buffer to ensure they are "all independent - let t:NERDTreeBufName = self._nextBufferName() - exec g:NERDTreeCreatePrefix . " edit " . t:NERDTreeBufName + exec g:NERDTreeCreatePrefix . " edit " . self._nextBufferName() call self._createNERDTree(path, "window") let b:NERDTree._previousBuf = bufnr(previousBuf) diff --git a/lib/nerdtree/nerdtree.vim b/lib/nerdtree/nerdtree.vim index c1ce5ed..e5ba0b5 100644 --- a/lib/nerdtree/nerdtree.vim +++ b/lib/nerdtree/nerdtree.vim @@ -153,7 +153,7 @@ endfunction "FUNCTION: s:NERDTree.IsOpen() {{{1 function! s:NERDTree.IsOpen() - return s:NERDTree.GetWinNum() != -1 + return s:NERDTree.GetWinNum() != -1 || bufname('%') =~# '^' . g:NERDTreeCreator.BufNamePrefix() . '\d\+$' endfunction "FUNCTION: s:NERDTree.isTabTree() {{{1