From 44db0e0c70b33ada23a1f8cf04c1b1f2b2eb65c6 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Fri, 9 Aug 2013 20:51:11 +0000 Subject: [PATCH] fix newb mistake. resolves #125. --- autoload/airline.vim | 8 ++++---- autoload/airline/themes.vim | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 6def0bf..81d02c0 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -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 diff --git a/autoload/airline/themes.vim b/autoload/airline/themes.vim index 31d4244..ec3e169 100644 --- a/autoload/airline/themes.vim +++ b/autoload/airline/themes.vim @@ -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