highlighter: vim9 script implementation of highlight_modified_inactive

This commit is contained in:
Christian 2020-11-18 12:09:43 +01:00 committed by Christian Brabandt
parent e9d4ff75da
commit 14fd943dc6
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -522,4 +522,17 @@ else
def airline#highlighter#add_accent(accent: string): void # {{{2 def airline#highlighter#add_accent(accent: string): void # {{{2
s:accents[accent] = 1 s:accents[accent] = 1
enddef enddef
def airline#highlighter#highlight_modified_inactive(bufnr: number): void # {{{2
var colors: list<string>
if getbufvar(bufnr, '&modified')
colors = exists('g:airline#themes#' .. g:airline_theme .. '#palette.inactive_modified.airline_c')
? eval('g:airline#themes#' .. g:airline_theme .. '#palette.inactive_modified.airline_c') : []
else
colors = exists('g:airline#themes#' .. g:airline_theme .. '#palette.inactive.airline_c')
? eval('g:airline#themes#' .. g:airline_theme .. '#palette.inactive.airline_c') : []
endif
if !empty(colors)
airline#highlighter#exec('airline_c' .. bufnr .. '_inactive', colors)
endif
enddef
endif " }}}1 endif " }}}1