Merge pull request #1547 from kaidiren/master

fix: refresh airline when airline_skip_empty_sections enabled in plugin in ale
This commit is contained in:
Christian Brabandt 2017-08-26 15:43:21 +02:00 committed by GitHub
commit 20de588fd1

View File

@ -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 <sid>ale_refresh()
augroup END
endfunction
function! s:ale_refresh()
if get(g:, 'airline_skip_empty_sections', 0)
exe ':AirlineRefresh'
endif
endfunction