highlighter: improve performance of get_array() function

This commit is contained in:
Christian Brabandt 2017-08-11 11:05:56 +02:00
parent c65d7fe36b
commit e9a7a12d9e
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -41,9 +41,10 @@ function! s:get_syn(group, what)
endfunction
function! s:get_array(fg, bg, opts)
let opts=empty(a:opts) ? '' : join(a:opts, ',')
return g:airline_gui_mode ==# 'gui'
\ ? [ a:fg, a:bg, '', '', join(a:opts, ',') ]
\ : [ '', '', a:fg, a:bg, join(a:opts, ',') ]
\ ? [ a:fg, a:bg, '', '', opts ]
\ : [ '', '', a:fg, a:bg, opts ]
endfunction
function! airline#highlighter#get_highlight(group, ...)