mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-05-19 23:09:47 +08:00
support for conditional parts. resolves #238.
This commit is contained in:
@@ -26,6 +26,10 @@ function! airline#parts#define_minwidth(key, width)
|
||||
call airline#parts#define(a:key, { 'minwidth': a:width })
|
||||
endfunction
|
||||
|
||||
function! airline#parts#define_condition(key, predicate)
|
||||
call airline#parts#define(a:key, { 'condition': a:predicate })
|
||||
endfunction
|
||||
|
||||
function! airline#parts#define_empty(keys)
|
||||
for key in a:keys
|
||||
call airline#parts#define_raw(key, '')
|
||||
|
||||
Reference in New Issue
Block a user