mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-18 18:05:55 +08:00
make syntastic use the warning section
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
" MIT license. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
|
||||
function! airline#extensions#syntastic#init(ext)
|
||||
if g:airline_section_gutter == ''
|
||||
let g:airline_section_gutter = '%#warningmsg#%{SyntasticStatuslineFlag()}'
|
||||
function! airline#extensions#syntastic#apply()
|
||||
if exists('w:airline_active') && w:airline_active
|
||||
let w:airline_section_warning = ' %#warningmsg#%{SyntasticStatuslineFlag()}'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#syntastic#init(ext)
|
||||
call a:ext.add_statusline_funcref(function('airline#extensions#syntastic#apply'))
|
||||
endfunction
|
||||
|
||||
@@ -10,7 +10,7 @@ function! airline#extensions#whitespace#check()
|
||||
let mixed = search('^ ', 'nw') != 0 && search('^\t', 'nw') != 0
|
||||
|
||||
if trailing || mixed
|
||||
let text = " ".g:airline_whitespace_symbol." "
|
||||
let text = g:airline_whitespace_symbol." "
|
||||
if g:airline_detect_whitespace == 1
|
||||
if trailing
|
||||
let text .= 'trailing '
|
||||
|
||||
Reference in New Issue
Block a user