mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 03:18:56 +08:00
Merge pull request #377 from blueyed/eclim-filter-signs
eclim: only consider signs placed by eclim
This commit is contained in:
commit
9039793343
|
@ -17,12 +17,18 @@ endfunction
|
|||
|
||||
function! airline#extensions#eclim#get_warnings()
|
||||
let eclimList = eclim#display#signs#GetExisting()
|
||||
|
||||
if !empty(eclimList)
|
||||
let errorsLine = eclimList[0]['line']
|
||||
let errorsNumber = len(eclimList)
|
||||
let errors = "[Eclim: line:".string(errorsLine)." (".string(errorsNumber).")]"
|
||||
if !exists(':SyntasticCheck') || SyntasticStatuslineFlag() == ''
|
||||
return errors.(g:airline_symbols.space)
|
||||
" Remove any non-eclim signs (see eclim#display#signs#Update)
|
||||
call filter(eclimList, "v:val.name =~ '^\(qf_\)\?\(error\|info\|warning\)$'")
|
||||
|
||||
if !empty(eclimList)
|
||||
let errorsLine = eclimList[0]['line']
|
||||
let errorsNumber = len(eclimList)
|
||||
let errors = "[Eclim: line:".string(errorsLine)." (".string(errorsNumber).")]"
|
||||
if !exists(':SyntasticCheck') || SyntasticStatuslineFlag() == ''
|
||||
return errors.(g:airline_symbols.space)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
return ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user