fix newb mistake. resolves #125.

This commit is contained in:
Bailey Ling 2013-08-09 20:51:11 +00:00
parent aabb061470
commit 44db0e0c70
2 changed files with 5 additions and 8 deletions

View File

@ -106,10 +106,10 @@ function! s:get_statusline(winnr, active)
let sl.=l:mode_color
let sl.=s:get_section(a:winnr, 'z')
" if a:active
" let warngroup = airline#themes#exec_highlight_separator('Al2', 'warningmsg')
" let sl.='%(%#'.warngroup.'#'.g:airline_right_sep.'%#warningmsg#'.s:getwinvar(a:winnr, 'airline_section_warning', '').'%)'
" endif
if a:active
let warngroup = airline#themes#exec_highlight_separator('Al2', 'warningmsg')
let sl.='%(%#'.warngroup.'#'.g:airline_right_sep.'%#warningmsg#'.s:getwinvar(a:winnr, 'airline_section_warning', '').'%)'
endif
endif
return sl
endfunction

View File

@ -49,9 +49,6 @@ function! airline#themes#exec_highlight_separator(from, to)
let l:from = airline#themes#get_highlight(a:from)
let l:to = airline#themes#get_highlight(a:to)
let group = a:from.'_to_'.a:to
exec printf('highlight %s guifg=%s guibg=%s ctermfg=%s ctermbg=%s',
\ group,
\ l:to[1], l:from[1],
\ l:to[3], l:from[3])
call airline#exec_highlight(group, [ l:to[1], l:from[1], l:to[3], l:from[3] ])
return group
endfunction