reload separator colors on demand

This commit is contained in:
Bailey Ling
2013-08-16 01:24:06 +00:00
parent f477520ba8
commit 47c80c31da
2 changed files with 16 additions and 3 deletions

View File

@@ -55,7 +55,9 @@ function! airline#highlight(modes)
endfor
endif
endfor
call airline#themes#exec_highlight_separator('Al2', 'warningmsg')
if exists('w:airline_current_builder')
call w:airline_current_builder.refresh_separator_highlights()
endif
endfunction
" for 7.2 compatibility
@@ -72,6 +74,7 @@ endfunction
function! airline#get_statusline(winnr, active)
let builder = airline#builder#new(a:active)
call setwinvar(a:winnr, 'airline_current_builder', builder)
if s:getwinvar(a:winnr, 'airline_render_left', a:active || (!a:active && !g:airline_inactive_collapse))
call builder.add_section('Al2', s:get_section(a:winnr, 'a').'%{g:airline_detect_paste && &paste ? g:airline_paste_symbol." " : ""}')