mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 09:41:33 +08:00
parent
b78c2ec475
commit
afcda0510e
|
@ -16,17 +16,6 @@ function! airline#extensions#ale#get(type)
|
|||
let is_err = a:type ==# 'error'
|
||||
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 counts = ale#statusline#Count(bufnr(''))
|
||||
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]
|
||||
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)
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user