1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:40:03 +08:00

Fix defx_root_check (#2741)

This commit is contained in:
Wang Shidong 2019-04-12 22:20:44 +08:00 committed by GitHub
parent 8153e523c2
commit 91f25ce169
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,6 +167,11 @@ function! DefxSmartL(_)
endfunction
function! DefxSmartH(_)
" if cursor line is first line, or in empty dir
if line('.') ==# 1 || line('$') ==# 1
return defx#call_action('cd', ['..'])
endif
" candidate is opend tree?
if defx#is_opened_tree()
return defx#call_action('close_tree')