1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:50:06 +08:00

Fix SPC e l key binding (#3467)

This commit is contained in:
Wang Shidong 2020-04-22 20:54:03 +08:00 committed by GitHub
parent 0ba60675cd
commit 5b734be94c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,20 +132,23 @@ function! s:neomake_cursor_move_delay() abort
endfunction
function! s:toggle_show_error(...) abort
try
let llist = getloclist(0, {'size' : 1, 'winid' : 1})
let qlist = getqflist({'size' : 1, 'winid' : 1})
if llist.size == 0 && qlist.size == 0
echohl WarningMsg
echon 'There is no errors!'
echohl None
return
endif
if llist.winid > 0
lclose
elseif qlist.winid > 0
cclose
elseif llist.size > 0
botright lopen
catch
try
if len(getqflist()) == 0
echohl WarningMsg
echon 'There is no errors!'
echohl None
else
botright copen
endif
catch
endtry
endtry
elseif qlist.size > 0
botright copen
endif
if a:1 == 1
wincmd w
endif