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:
Martin Grenfell
2015-05-01 15:33:06 +01:00
parent 1cbd52aa77
commit 87b27802b5
2 changed files with 32 additions and 16 deletions

View File

@@ -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