parent
b78c2ec475
commit
afcda0510e
@ -16,17 +16,6 @@ function! airline#extensions#ale#get(type)
|
|||||||
let is_err = a:type ==# 'error'
|
let is_err = a:type ==# 'error'
|
||||||
let symbol = is_err ? s:error_symbol : s:warning_symbol
|
let symbol = is_err ? s:error_symbol : s:warning_symbol
|
||||||
|
|
||||||
if !exists('b:airline_extensions_ale_dict')
|
|
||||||
let b:airline_extensions_ale_dict = {}
|
|
||||||
let b:airline_extensions_ale_dict.error = 0
|
|
||||||
let b:airline_extensions_ale_dict.warning = 0
|
|
||||||
let b:airline_extensions_ale_dict.change = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
if b:airline_extensions_ale_dict.change == b:changedtick
|
|
||||||
return s:airline_ale_count(b:airline_extensions_ale_dict[a:type], symbol)
|
|
||||||
endif
|
|
||||||
|
|
||||||
let is_err = a:type ==# 'error'
|
let is_err = a:type ==# 'error'
|
||||||
let counts = ale#statusline#Count(bufnr(''))
|
let counts = ale#statusline#Count(bufnr(''))
|
||||||
let symbol = is_err ? s:error_symbol : s:warning_symbol
|
let symbol = is_err ? s:error_symbol : s:warning_symbol
|
||||||
@ -40,9 +29,6 @@ function! airline#extensions#ale#get(type)
|
|||||||
let num = is_err ? counts[0] : counts[1]
|
let num = is_err ? counts[0] : counts[1]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:airline_extensions_ale_dict[a:type] = num
|
|
||||||
let b:airline_extensions_ale_dict['change'] = b:changedtick
|
|
||||||
|
|
||||||
return s:airline_ale_count(num, symbol)
|
return s:airline_ale_count(num, symbol)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user