improve builder to support blended sections.

This commit is contained in:
Bailey Ling 2013-08-25 00:06:52 -04:00
parent 59d6b72962
commit b9483d8c15
1 changed files with 7 additions and 3 deletions

View File

@ -10,9 +10,13 @@ endfunction
function! s:prototype.add_section(group, contents)
if self._curgroup != ''
call airline#highlighter#add_separator(self._curgroup, a:group, self._side)
let self._line .= '%#'.self._curgroup.'_to_'.a:group.'#'
let self._line .= self._side ? g:airline_left_sep : g:airline_right_sep
if self._curgroup == a:group
let self._line .= self._side ? g:airline_left_alt_sep : g:airline_right_alt_sep
else
call airline#highlighter#add_separator(self._curgroup, a:group, self._side)
let self._line .= '%#'.self._curgroup.'_to_'.a:group.'#'
let self._line .= self._side ? g:airline_left_sep : g:airline_right_sep
endif
endif
let self._line .= '%#'.a:group.'#'.a:contents