Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go on a bookmark directory will NERDTreeFind it. #1236

Merged
merged 3 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
-->
#### 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)
- **.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)
Expand Down
6 changes: 5 additions & 1 deletion autoload/nerdtree/ui_glue.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/NERDTree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Key Description help-tag~

o........Open files, directories and bookmarks......................|NERDTree-o|
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........Same as 't' but keep the focus on the current tab..........|NERDTree-T|
i........Open selected file in a split window.......................|NERDTree-i|
Expand Down