From b9483d8c15454ece0ffa74fcdd8d3e3c04bad11c Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sun, 25 Aug 2013 00:06:52 -0400 Subject: [PATCH] improve builder to support blended sections. --- autoload/airline/builder.vim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/autoload/airline/builder.vim b/autoload/airline/builder.vim index 52a2d0a8..e4430fe4 100644 --- a/autoload/airline/builder.vim +++ b/autoload/airline/builder.vim @@ -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