mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-05-17 22:09:40 +08:00
introduce new warning section, and refactor whitespace into an extension which uses it
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
" MIT license. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
|
||||
function! airline#extensions#whitespace#check()
|
||||
let w:airline_section_warning = '%{get(w:, "airline_active", 0) && search(" $", "nw")'
|
||||
\ .'? " ".g:airline_whitespace_symbol." " : ""}'
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#whitespace#init(ext)
|
||||
call a:ext.add_statusline_funcref(function('airline#extensions#whitespace#check'))
|
||||
endfunction
|
||||
Reference in New Issue
Block a user