mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
remove NERDTree.previousBuf() and related code
We were using this when closing a wintree - to go to the previous buffer. Not sure why we weren't just using `:bprev` ...
This commit is contained in:
@@ -207,14 +207,15 @@ endfunction
|
||||
" FUNCTION: s:closeTreeWindow() {{{1
|
||||
" close the tree window
|
||||
function! s:closeTreeWindow()
|
||||
if b:NERDTree.isWinTree() && b:NERDTree.previousBuf() != -1
|
||||
exec "buffer " . b:NERDTree.previousBuf()
|
||||
if b:NERDTree.isWinTree()
|
||||
bp
|
||||
return
|
||||
endif
|
||||
|
||||
if winnr("$") > 1
|
||||
call g:NERDTree.Close()
|
||||
else
|
||||
if winnr("$") > 1
|
||||
call g:NERDTree.Close()
|
||||
else
|
||||
call nerdtree#echo("Cannot close last window")
|
||||
endif
|
||||
call nerdtree#echo("Cannot close last window")
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user