go on a bookmark directory will NERDTreeFind it. (#1236)

* `go` on a bookmark directory will NERDTreeFind it.

This leaves the root unchanged if possible.

* Update version number in change log.
This commit is contained in:
Phil Runninger
2021-03-24 23:41:15 -04:00
committed by GitHub
parent f63fb6984f
commit 81f3eaba29
3 changed files with 8 additions and 3 deletions

View File

@@ -572,7 +572,11 @@ endfunction
" FUNCTION: s:previewBookmark(bookmark) {{{1
function! s:previewBookmark(bookmark) abort
call a:bookmark.activate(b:NERDTree, !a:bookmark.path.isDirectory ? {'stay': 1, 'where': 'p', 'keepopen': 1} : {})
if a:bookmark.path.isDirectory
execute 'NERDTreeFind '.a:bookmark.path.str()
else
call a:bookmark.activate(b:NERDTree, {'stay': 1, 'where': 'p', 'keepopen': 1})
endif
endfunction
"FUNCTION: s:previewNodeCurrent(node) {{{1