Fix refreshroot (#999)

* Set t:NERDTreeBufName when creating a window tree.

* Change folding markers.
This commit is contained in:
Phil Runninger
2019-06-07 21:41:47 -04:00
committed by GitHub
parent 67fa9b3116
commit 28eb47e267
3 changed files with 7 additions and 6 deletions

View File

@@ -367,7 +367,7 @@ function! s:jumpToLastChild(node)
call s:jumpToChild(a:node, 1) call s:jumpToChild(a:node, 1)
endfunction endfunction
" FUNCTION: s:jumpToChild(node, last) {{{2 " FUNCTION: s:jumpToChild(node, last) {{{1
" Jump to the first or last child node at the same file system level. " Jump to the first or last child node at the same file system level.
" "
" Args: " Args:
@@ -425,7 +425,7 @@ function! s:jumpToPrevSibling(node)
call s:jumpToSibling(a:node, 0) call s:jumpToSibling(a:node, 0)
endfunction endfunction
" FUNCTION: s:jumpToSibling(node, forward) {{{2 " FUNCTION: s:jumpToSibling(node, forward) {{{1
" Move the cursor to the next or previous node at the same file system level. " Move the cursor to the next or previous node at the same file system level.
" "
" Args: " Args:

View File

@@ -96,7 +96,8 @@ function! s:Creator.createWindowTree(dir)
"we need a unique name for each window tree buffer to ensure they are "we need a unique name for each window tree buffer to ensure they are
"all independent "all independent
exec g:NERDTreeCreatePrefix . " edit " . self._nextBufferName() let t:NERDTreeBufName = self._nextBufferName()
exec g:NERDTreeCreatePrefix . " edit " . t:NERDTreeBufName
call self._createNERDTree(path, "window") call self._createNERDTree(path, "window")
let b:NERDTree._previousBuf = bufnr(previousBuf) let b:NERDTree._previousBuf = bufnr(previousBuf)
@@ -218,14 +219,14 @@ function! s:Creator.New()
return newCreator return newCreator
endfunction endfunction
" FUNCTION: s:Creator._nextBufferName() {{{2 " FUNCTION: s:Creator._nextBufferName() {{{1
" returns the buffer name for the next nerd tree " returns the buffer name for the next nerd tree
function! s:Creator._nextBufferName() function! s:Creator._nextBufferName()
let name = s:Creator.BufNamePrefix() . self._nextBufferNumber() let name = s:Creator.BufNamePrefix() . self._nextBufferNumber()
return name return name
endfunction endfunction
" FUNCTION: s:Creator._nextBufferNumber() {{{2 " FUNCTION: s:Creator._nextBufferNumber() {{{1
" the number to add to the nerd tree buffer name to make the buf name unique " the number to add to the nerd tree buffer name to make the buf name unique
function! s:Creator._nextBufferNumber() function! s:Creator._nextBufferNumber()
if !exists("s:Creator._NextBufNum") if !exists("s:Creator._NextBufNum")

View File

@@ -6,7 +6,7 @@
let s:UI = {} let s:UI = {}
let g:NERDTreeUI = s:UI let g:NERDTreeUI = s:UI
" FUNCTION: s:UI.centerView() {{{2 " FUNCTION: s:UI.centerView() {{{1
" centers the nerd tree window around the cursor (provided the nerd tree " centers the nerd tree window around the cursor (provided the nerd tree
" options permit) " options permit)
function! s:UI.centerView() function! s:UI.centerView()