move a couple of functions into NERDTreeCreator

The "next buffer name" functions are only used in NERDTreeCreator so put
them there.
This commit is contained in:
Martin Grenfell
2013-01-09 09:48:16 +00:00
parent c3b63d2fd9
commit 64cb6204cc
3 changed files with 28 additions and 28 deletions

View File

@@ -33,11 +33,6 @@ function! nerdtree#bufInWindows(bnum)
return cnt
endfunction
" FUNCTION: nerdtree#bufNamePrefix() {{{2
function! nerdtree#bufNamePrefix()
return 'NERD_tree_'
endfunction
"FUNCTION: nerdtree#checkForBrowse(dir) {{{2
"inits a secondary nerd tree in the current buffer if appropriate
function! nerdtree#checkForBrowse(dir)
@@ -232,25 +227,6 @@ function! nerdtree#invokeKeyMap(key)
call g:NERDTreeKeyMap.Invoke(a:key)
endfunction
" FUNCTION: nerdtree#nextBufferName() {{{2
" returns the buffer name for the next nerd tree
function! nerdtree#nextBufferName()
let name = nerdtree#bufNamePrefix() . nerdtree#nextBufferNumber()
return name
endfunction
" FUNCTION: nerdtree#nextBufferNumber() {{{2
" the number to add to the nerd tree buffer name to make the buf name unique
function! nerdtree#nextBufferNumber()
if !exists("s:nextBufNum")
let s:nextBufNum = 1
else
let s:nextBufNum += 1
endif
return s:nextBufNum
endfunction
" FUNCTION: nerdtree#postSourceActions() {{{2
function! nerdtree#postSourceActions()
call g:NERDTreeBookmark.CacheBookmarks(0)