mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53:48 -05:00
replace a script level var with a query
This commit is contained in:
@@ -7,9 +7,6 @@ function! nerdtree#version()
|
||||
return '4.2.0'
|
||||
endfunction
|
||||
|
||||
"the number to add to the nerd tree buffer name to make the buf name unique
|
||||
let s:next_buffer_number = 1
|
||||
|
||||
" SECTION: General Functions {{{1
|
||||
"============================================================
|
||||
"FUNCTION: nerdtree#bufInWindows(bnum){{{2
|
||||
@@ -377,11 +374,22 @@ endfunction
|
||||
" FUNCTION: nerdtree#nextBufferName() {{{2
|
||||
" returns the buffer name for the next nerd tree
|
||||
function! nerdtree#nextBufferName()
|
||||
let name = nerdtree#bufNamePrefix() . s:next_buffer_number
|
||||
let s:next_buffer_number += 1
|
||||
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