mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 12:50:04 +08:00
fix(nerdtree): fix Enter
key binding of nerdtree
This commit is contained in:
parent
1cd8341200
commit
e9cc0e46f7
@ -94,10 +94,13 @@ function! s:nerdtree_dot() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:nerdtree_enter() abort
|
function! s:nerdtree_enter() abort
|
||||||
let path = g:NERDTreeFileNode.GetSelected().path.str()
|
let node = g:NERDTreeFileNode.GetSelected()
|
||||||
|
if has_key(node, 'path')
|
||||||
|
let path = node.path.str()
|
||||||
if isdirectory(path)
|
if isdirectory(path)
|
||||||
silent! exe 'NERDTree' g:NERDTreeFileNode.GetSelected().path.str()
|
silent! exe 'NERDTree' g:NERDTreeFileNode.GetSelected().path.str()
|
||||||
else
|
else
|
||||||
call g:NERDTreeKeyMap.Invoke('o')
|
call g:NERDTreeKeyMap.Invoke('o')
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user