mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 20:03: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'
|
return '4.2.0'
|
||||||
endfunction
|
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
|
" SECTION: General Functions {{{1
|
||||||
"============================================================
|
"============================================================
|
||||||
"FUNCTION: nerdtree#bufInWindows(bnum){{{2
|
"FUNCTION: nerdtree#bufInWindows(bnum){{{2
|
||||||
@@ -377,11 +374,22 @@ endfunction
|
|||||||
" FUNCTION: nerdtree#nextBufferName() {{{2
|
" FUNCTION: nerdtree#nextBufferName() {{{2
|
||||||
" returns the buffer name for the next nerd tree
|
" returns the buffer name for the next nerd tree
|
||||||
function! nerdtree#nextBufferName()
|
function! nerdtree#nextBufferName()
|
||||||
let name = nerdtree#bufNamePrefix() . s:next_buffer_number
|
let name = nerdtree#bufNamePrefix() . nerdtree#nextBufferNumber()
|
||||||
let s:next_buffer_number += 1
|
|
||||||
return name
|
return name
|
||||||
endfunction
|
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() {{{2
|
||||||
function! nerdtree#postSourceActions()
|
function! nerdtree#postSourceActions()
|
||||||
call g:NERDTreeBookmark.CacheBookmarks(0)
|
call g:NERDTreeBookmark.CacheBookmarks(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user