From c4f8681b775e42807697155a1155adf2670e1037 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Fri, 20 Nov 2015 01:52:38 +0000 Subject: [PATCH] add NERDTree.getRoot() and NERDTree.ForCurrentTab() --- lib/nerdtree/nerdtree.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/nerdtree/nerdtree.vim b/lib/nerdtree/nerdtree.vim index 284111a..ac34e89 100644 --- a/lib/nerdtree/nerdtree.vim +++ b/lib/nerdtree/nerdtree.vim @@ -112,6 +112,16 @@ function! s:NERDTree.ForCurrentBuf() endif endfunction +"FUNCTION: s:NERDTree.ForCurrentTab() {{{1 +function! s:NERDTree.ForCurrentTab() + if !s:NERDTree.ExistsForTab() + return + endif + + let bufnr = bufnr(t:NERDTreeBufName) + return getbufvar(bufnr, "NERDTree") +endfunction + "FUNCTION: s:NERDTree.GetWinNum() {{{1 "gets the nerd tree window number for this tab function! s:NERDTree.GetWinNum()