From 53aa65a5ce88088d16ab8dcb8c29d782ae159dc2 Mon Sep 17 00:00:00 2001 From: Konstantinos Natsakis Date: Thu, 17 Jan 2019 15:34:19 +0200 Subject: [PATCH] Fix ctrlp memory leak --- autoload/airline/highlighter.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 085afa07..5d4a7d7e 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -76,11 +76,11 @@ function! airline#highlighter#get_highlight(group, ...) let fg = s:get_syn(a:group, 'fg') let bg = s:get_syn(a:group, 'bg') let bold = synIDattr(synIDtrans(hlID(a:group)), 'bold') - let opts = a:000 - if bold - let opts = ['bold'] + if reverse + let res = s:get_array(bg, fg, bold ? ['bold'] : a:000) + else + let res = s:get_array(fg, bg, bold ? ['bold'] : a:000) endif - let res = reverse ? s:get_array(bg, fg, opts) : s:get_array(fg, bg, opts) endif let s:hl_groups[a:group] = res return res