From 90de76359f82a2aa57ddcf670fc82e6e02909fb5 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 18 Nov 2020 09:10:22 +0100 Subject: [PATCH] highlighter: use synIDtrans() in s:hl_group_exists (legacy vimscript) When checking the defined foreground color in the function that checks whether a highlighting group exists, it should follow the syntax group links and check the final color. --- autoload/airline/highlighter.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 92b60200..f845d7db 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -88,7 +88,7 @@ if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0)==0) function! s:hl_group_exists(group) abort " {{{2 if !hlexists(a:group) return 0 - elseif empty(synIDattr(hlID(a:group), 'fg')) + elseif empty(synIDattr(synIDtrans(hlID(a:group)), 'fg')) return 0 endif return 1