move the closeTree functions out of autoload

Remove `closeTreeIfOpen` and just make `closeTree` fail silently.
This commit is contained in:
Martin Grenfell
2015-05-02 15:01:58 +01:00
parent 0d88ce946f
commit 53d2de86eb
5 changed files with 38 additions and 45 deletions

View File

@@ -56,7 +56,7 @@ function! s:Creator.createPrimary(name)
if g:NERDTree.ExistsForTab()
if g:NERDTree.IsOpen()
call nerdtree#closeTree()
call g:NERDTree.Close()
endif
unlet t:NERDTreeBufName
endif
@@ -169,7 +169,7 @@ function! s:Creator.createMirror()
endif
if g:NERDTree.ExistsForTab() && g:NERDTree.IsOpen()
call nerdtree#closeTree()
call g:NERDTree.Close()
endif
let t:NERDTreeBufName = bufferName
@@ -340,7 +340,7 @@ function! s:Creator.togglePrimary(dir)
endif
call b:NERDTree.ui.restoreScreenState()
else
call nerdtree#closeTree()
call g:NERDTree.Close()
endif
else
call self.createPrimary(a:dir)