mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-11 04:43:49 -05:00
rename "primary" and "secondary" trees to "tab" and "window" trees
This is much more accurate and descriptive.
This commit is contained in:
@@ -11,10 +11,10 @@ endfunction
|
||||
"============================================================
|
||||
|
||||
"FUNCTION: nerdtree#checkForBrowse(dir) {{{2
|
||||
"inits a secondary nerd tree in the current buffer if appropriate
|
||||
"inits a window tree in the current buffer if appropriate
|
||||
function! nerdtree#checkForBrowse(dir)
|
||||
if a:dir != '' && isdirectory(a:dir)
|
||||
call g:NERDTreeCreator.CreateSecondary(a:dir)
|
||||
call g:NERDTreeCreator.CreateWindowTree(a:dir)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ endfunction
|
||||
" FUNCTION: s:closeTreeWindow() {{{1
|
||||
" close the tree window
|
||||
function! s:closeTreeWindow()
|
||||
if b:NERDTreeType ==# "secondary" && b:NERDTreePreviousBuf != -1
|
||||
if b:NERDTreeType ==# "window" && b:NERDTreePreviousBuf != -1
|
||||
exec "buffer " . b:NERDTreePreviousBuf
|
||||
else
|
||||
if winnr("$") > 1
|
||||
@@ -269,14 +269,14 @@ function! s:findAndRevealPath()
|
||||
endtry
|
||||
|
||||
if p.isUnder(cwd)
|
||||
call g:NERDTreeCreator.CreatePrimary(cwd.str())
|
||||
call g:NERDTreeCreator.CreateTabTree(cwd.str())
|
||||
else
|
||||
call g:NERDTreeCreator.CreatePrimary(p.getParent().str())
|
||||
call g:NERDTreeCreator.CreateTabTree(p.getParent().str())
|
||||
endif
|
||||
else
|
||||
if !p.isUnder(g:NERDTreeFileNode.GetRootForTab().path)
|
||||
if !g:NERDTree.IsOpen()
|
||||
call g:NERDTreeCreator.TogglePrimary('')
|
||||
call g:NERDTreeCreator.ToggleTabTree('')
|
||||
else
|
||||
call g:NERDTree.CursorToTreeWin()
|
||||
endif
|
||||
@@ -284,7 +284,7 @@ function! s:findAndRevealPath()
|
||||
call s:chRoot(g:NERDTreeDirNode.New(p.getParent()))
|
||||
else
|
||||
if !g:NERDTree.IsOpen()
|
||||
call g:NERDTreeCreator.TogglePrimary("")
|
||||
call g:NERDTreeCreator.ToggleTabTree("")
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -545,10 +545,10 @@ endfunction
|
||||
|
||||
" FUNCTION: nerdtree#ui_glue#setupCommands() {{{1
|
||||
function! nerdtree#ui_glue#setupCommands()
|
||||
command! -n=? -complete=dir -bar NERDTree :call g:NERDTreeCreator.CreatePrimary('<args>')
|
||||
command! -n=? -complete=dir -bar NERDTreeToggle :call g:NERDTreeCreator.TogglePrimary('<args>')
|
||||
command! -n=? -complete=dir -bar NERDTree :call g:NERDTreeCreator.CreateTabTree('<args>')
|
||||
command! -n=? -complete=dir -bar NERDTreeToggle :call g:NERDTreeCreator.ToggleTabTree('<args>')
|
||||
command! -n=0 -bar NERDTreeClose :call g:NERDTree.Close()
|
||||
command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreatePrimary('<args>')
|
||||
command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreateTabTree('<args>')
|
||||
command! -n=0 -bar NERDTreeMirror call g:NERDTreeCreator.CreateMirror()
|
||||
command! -n=0 -bar NERDTreeFind call s:findAndRevealPath()
|
||||
command! -n=0 -bar NERDTreeFocus call NERDTreeFocus()
|
||||
|
||||
Reference in New Issue
Block a user