From e9a7a12d9e1ace3dd0778c375c1b77d2879ba137 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 11 Aug 2017 11:05:56 +0200 Subject: [PATCH] highlighter: improve performance of get_array() function --- autoload/airline/highlighter.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 485045dd..4fa3d464 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -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, ...)