mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:10:06 +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
|
||||
|
||||
function! s:nerdtree_enter() abort
|
||||
let path = g:NERDTreeFileNode.GetSelected().path.str()
|
||||
if isdirectory(path)
|
||||
silent! exe 'NERDTree' g:NERDTreeFileNode.GetSelected().path.str()
|
||||
else
|
||||
call g:NERDTreeKeyMap.Invoke('o')
|
||||
let node = g:NERDTreeFileNode.GetSelected()
|
||||
if has_key(node, 'path')
|
||||
let path = node.path.str()
|
||||
if isdirectory(path)
|
||||
silent! exe 'NERDTree' g:NERDTreeFileNode.GetSelected().path.str()
|
||||
else
|
||||
call g:NERDTreeKeyMap.Invoke('o')
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user