diff --git a/autoload/airline/extensions/ale.vim b/autoload/airline/extensions/ale.vim index 97eadf4..07639a8 100644 --- a/autoload/airline/extensions/ale.vim +++ b/autoload/airline/extensions/ale.vim @@ -43,4 +43,14 @@ endfunction function! airline#extensions#ale#init(ext) call airline#parts#define_function('ale_error_count', 'airline#extensions#ale#get_error') call airline#parts#define_function('ale_warning_count', 'airline#extensions#ale#get_warning') + augroup airline_ale + autocmd! + autocmd CursorHold,BufWritePost * call ale_refresh() + augroup END +endfunction + +function! s:ale_refresh() + if get(g:, 'airline_skip_empty_sections', 0) + exe ':AirlineRefresh' + endif endfunction