mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-23 05:55:38 +02:00
highlighter: vim9 script implementation of s:hl_group_exists
This commit is contained in:
parent
90de76359f
commit
a6b7267979
@ -394,4 +394,12 @@ else
|
|||||||
var rest = [ rest1, rest2, rest3 ]
|
var rest = [ rest1, rest2, rest3 ]
|
||||||
return s:get_array(guifg, guibg, ctermfg, ctermbg, filter(rest, {_, v -> !empty(v)}))
|
return s:get_array(guifg, guibg, ctermfg, ctermbg, filter(rest, {_, v -> !empty(v)}))
|
||||||
enddef
|
enddef
|
||||||
|
def s:hl_group_exists(group: string): bool # {{{2
|
||||||
|
if !hlexists(group)
|
||||||
|
return false
|
||||||
|
elseif hlID(group)->synIDtrans()->synIDattr('fg')->empty()
|
||||||
|
return false
|
||||||
|
endif
|
||||||
|
return true
|
||||||
|
enddef
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user