mirror of
https://github.com/preservim/nerdtree.git
synced 2025-02-07 12:25:15 +08:00
minor refactor
This commit is contained in:
parent
dc108f555e
commit
fedd5f1162
|
@ -2658,7 +2658,7 @@ function! s:centerView()
|
|||
endif
|
||||
endfunction
|
||||
"FUNCTION: s:closeTree() {{{2
|
||||
"Closes the NERD tree window
|
||||
"Closes the primary NERD tree window for this tab
|
||||
function! s:closeTree()
|
||||
if !s:isTreeOpen()
|
||||
throw "NERDTree.NoTreeFoundError: no NERDTree is open"
|
||||
|
@ -3580,7 +3580,7 @@ function! s:closeTreeWindow()
|
|||
exec "buffer " . b:NERDTreePreviousBuf
|
||||
else
|
||||
if winnr("$") > 1
|
||||
wincmd c
|
||||
call s:closeTree()
|
||||
else
|
||||
call s:echo("Cannot close last window")
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user