extract colors from normal if undefined (#67, #113).

This commit is contained in:
Bailey Ling
2013-08-04 19:10:44 +00:00
parent 2bedd8ef84
commit a5fe4d9972
4 changed files with 16 additions and 6 deletions
+10 -2
View File
@@ -19,9 +19,17 @@ function! s:get_syn(group, what)
endfunction
function! s:get_array(fg, bg, opts)
let fg = a:fg
let bg = a:bg
if fg == '' || fg < 0
let fg = s:get_syn('Normal', 'fg')
endif
if bg == '' || bg < 0
let bg = s:get_syn('Normal', 'bg')
endif
return has('gui_running')
\ ? [ a:fg, a:bg, '', '', join(a:opts, ',') ]
\ : [ '', '', a:fg >= 0 ? a:fg : '', a:bg >= 0 ? a:bg : '', join(a:opts, ',') ]
\ ? [ fg, bg, '', '', join(a:opts, ',') ]
\ : [ '', '', fg, bg, join(a:opts, ',') ]
endfunction
function! airline#themes#get_highlight(group, ...)