From ba899b2dde118341e95c0e6a145b3feca011811d Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 4 Dec 2013 08:58:30 +0100 Subject: [PATCH] eclim: only consider signs placed by eclim Ref: https://github.com/bling/vim-airline/pull/293 --- autoload/airline/extensions/eclim.vim | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/autoload/airline/extensions/eclim.vim b/autoload/airline/extensions/eclim.vim index ff6a84f..6836046 100644 --- a/autoload/airline/extensions/eclim.vim +++ b/autoload/airline/extensions/eclim.vim @@ -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 ''