fix: refresh airline when airline_skip_empty_sections enabled in plugin ale
This commit is contained in:
parent
db907f5598
commit
2b45581f1c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue