1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:50:05 +08:00

fix(nerdtree): fix key binding h in filetree

This commit is contained in:
Shidong Wang 2021-09-25 01:12:26 +08:00
parent ba588581ee
commit fd96c4ea1f
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848

View File

@ -62,15 +62,13 @@ function! s:copy_to_system_clipboard() abort
endfunction
function! s:nerdtree_h() abort
" let path = g:NERDTreeFileNode.GetSelected().path.str()
" if isdirectory(path)
" let path = s:FILE.unify_path(path, ':p:h:h')
" else
" let path = s:FILE.unify_path(path, ':p:h')
" endif
" exe 'NERDTreeFind ' . path
if g:NERDTree.ForCurrentTab().getRoot().path.str()
\ ==# g:NERDTreeFileNode.GetSelected().path.getParent().str()
silent! exe 'NERDTree' g:NERDTreeFileNode.GetSelected().path.getParent().getParent().str()
else
call g:NERDTreeKeyMap.Invoke('p')
call g:NERDTreeKeyMap.Invoke('o')
endif
endfunction
function! s:nerdtree_l() abort