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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -5,7 +5,8 @@
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
--> -->
#### 6.10 #### 6.10
- **.8**: Put `Callback` function variables in local scope. [#1230](https://github.com/preservim/nerdtree/pull/1230) - **.9**: `go` on a bookmark directory will NERDTreeFind it. (PhilRunninger) [#1236](https://github.com/preservim/nerdtree/pull/1236)
- **.8**: Put `Callback` function variables in local scope. (PhilRunninger) [#1230](https://github.com/preservim/nerdtree/pull/1230)
- **.7**: Fix mouse-clicking a file to open it. (PhilRunninger) [#1225](https://github.com/preservim/nerdtree/pull/1225) - **.7**: Fix mouse-clicking a file to open it. (PhilRunninger) [#1225](https://github.com/preservim/nerdtree/pull/1225)
- **.6**: Restore the default behavior of the <CR> key. (PhilRunninger) [#1221](https://github.com/preservim/nerdtree/pull/1221) - **.6**: Restore the default behavior of the <CR> key. (PhilRunninger) [#1221](https://github.com/preservim/nerdtree/pull/1221)
- **.5**: Fix `{'keepopen':0}` in NERDTreeCustomOpenArgs (PhilRunninger) [#1217](https://github.com/preservim/nerdtree/pull/1217) - **.5**: Fix `{'keepopen':0}` in NERDTreeCustomOpenArgs (PhilRunninger) [#1217](https://github.com/preservim/nerdtree/pull/1217)

View File

@ -572,7 +572,11 @@ endfunction
" FUNCTION: s:previewBookmark(bookmark) {{{1 " FUNCTION: s:previewBookmark(bookmark) {{{1
function! s:previewBookmark(bookmark) abort 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 endfunction
"FUNCTION: s:previewNodeCurrent(node) {{{1 "FUNCTION: s:previewNodeCurrent(node) {{{1

View File

@ -249,7 +249,7 @@ Key Description help-tag~
o........Open files, directories and bookmarks......................|NERDTree-o| o........Open files, directories and bookmarks......................|NERDTree-o|
go.......Open selected file, but leave cursor in the NERDTree......|NERDTree-go| go.......Open selected file, but leave cursor in the NERDTree......|NERDTree-go|
Open selected bookmark directory in current NERDTree Find selected bookmark directory in current NERDTree
t........Open selected node/bookmark in a new tab...................|NERDTree-t| t........Open selected node/bookmark in a new tab...................|NERDTree-t|
T........Same as 't' but keep the focus on the current tab..........|NERDTree-T| T........Same as 't' but keep the focus on the current tab..........|NERDTree-T|
i........Open selected file in a split window.......................|NERDTree-i| i........Open selected file in a split window.......................|NERDTree-i|