mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-28 08:24:24 +02:00
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.
This commit is contained in:
parent
0238d386bb
commit
90de76359f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user