Fix handlers for "t" and "T" on bookmarks

The "t" and "T" mappings didn't work on bookmarks.  This commit
fixes this problem by making the callbacks more general.

Fixes #565.
This commit is contained in:
Jason Franklin 2017-11-11 12:10:08 -05:00
parent ae1c95bcbc
commit c9f7014034

View File

@ -494,12 +494,14 @@ endfunction
" FUNCTION: s:openInNewTab(target) {{{1 " FUNCTION: s:openInNewTab(target) {{{1
function! s:openInNewTab(target) function! s:openInNewTab(target)
call a:target.open({'where': 't'}) let l:opener = g:NERDTreeOpener.New(a:target.path, {'where': 't'})
call l:opener.open(a:target)
endfunction endfunction
" FUNCTION: s:openInNewTabSilent(target) {{{1 " FUNCTION: s:openInNewTabSilent(target) {{{1
function! s:openInNewTabSilent(target) function! s:openInNewTabSilent(target)
call a:target.open({'where': 't', 'stay': 1}) let l:opener = g:NERDTreeOpener.New(a:target.path, {'where': 't', 'stay': 1})
call l:opener.open(a:target)
endfunction endfunction
" FUNCTION: s:openNodeRecursively(node) {{{1 " FUNCTION: s:openNodeRecursively(node) {{{1