Enable root refresh on "vim ." a different way than #999. (#1001)

* Fix "R doesn't work when doing 'vim <folder>'" a different way.

Instead of assigning a value to t:NERDTreeBufName for a window tree,
which is used to determine if NERDTree is open, simply also look at the
current buffer's name to see if it matches the NERDTree pattern.

* Replace hardcoded buffer name prefix with BufNamePrefix() function.
This commit is contained in:
Phil Runninger
2019-06-13 09:16:56 -04:00
committed by GitHub
parent 28eb47e267
commit 70dc34cb69
2 changed files with 2 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ endfunction
"FUNCTION: s:NERDTree.IsOpen() {{{1
function! s:NERDTree.IsOpen()
return s:NERDTree.GetWinNum() != -1
return s:NERDTree.GetWinNum() != -1 || bufname('%') =~# '^' . g:NERDTreeCreator.BufNamePrefix() . '\d\+$'
endfunction
"FUNCTION: s:NERDTree.isTabTree() {{{1