move b:NERDTreeType into the NERDTree class and add some query methods

This commit is contained in:
Martin Grenfell
2015-11-14 12:01:55 +00:00
parent 848857d18b
commit 5c20274761
6 changed files with 25 additions and 16 deletions

View File

@@ -208,7 +208,7 @@ endfunction
" FUNCTION: s:closeTreeWindow() {{{1
" close the tree window
function! s:closeTreeWindow()
if b:NERDTreeType ==# "window" && b:NERDTreePreviousBuf != -1
if b:NERDTree.isWinTree() && b:NERDTreePreviousBuf != -1
exec "buffer " . b:NERDTreePreviousBuf
else
if winnr("$") > 1