mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
allow control over whether to reuse windows in different tabs
When opening a file we will "reuse" a window if the buffer is already open somewhere. Add an option to NERDTreeOpener to configure it to not reuse windows across tabs.
This commit is contained in:
@@ -93,13 +93,13 @@ endfunction
|
||||
"FUNCTION: s:activateDirNode() {{{1
|
||||
"handle the user activating a tree node
|
||||
function! s:activateDirNode(node)
|
||||
call a:node.activate({'reuse': 1})
|
||||
call a:node.activate()
|
||||
endfunction
|
||||
|
||||
"FUNCTION: s:activateFileNode() {{{1
|
||||
"handle the user activating a tree node
|
||||
function! s:activateFileNode(node)
|
||||
call a:node.activate({'reuse': 1, 'where': 'p'})
|
||||
call a:node.activate({'reuse': 'all', 'where': 'p'})
|
||||
endfunction
|
||||
|
||||
"FUNCTION: s:activateBookmark() {{{1
|
||||
@@ -324,7 +324,7 @@ function! s:handleLeftClick()
|
||||
if currentNode.path.isDirectory
|
||||
call currentNode.activate()
|
||||
else
|
||||
call currentNode.activate({'reuse': 1, 'where': 'p'})
|
||||
call currentNode.activate({'reuse': 'all', 'where': 'p'})
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user