move b:NERDTreePreviousBuf into NERDTree class

This commit is contained in:
Martin Grenfell
2015-11-14 13:10:08 +00:00
parent 5c20274761
commit 4d8a0c90cb
3 changed files with 7 additions and 3 deletions

View File

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