support for conditional parts. resolves #238.

This commit is contained in:
Bailey Ling
2013-09-08 19:06:57 -04:00
parent 4c6aa4401b
commit 55f524de77
5 changed files with 29 additions and 3 deletions
+4
View File
@@ -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, '')