mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-10 04:13:48 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user