mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-03-05 06:34:13 +08: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:
committed by
Christian Brabandt
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
|
function! s:hl_group_exists(group) abort " {{{2
|
||||||
if !hlexists(a:group)
|
if !hlexists(a:group)
|
||||||
return 0
|
return 0
|
||||||
elseif empty(synIDattr(hlID(a:group), 'fg'))
|
elseif empty(synIDattr(synIDtrans(hlID(a:group)), 'fg'))
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user