add variardic arguments to get_highlight functions
This commit is contained in:
parent
25d53a80f4
commit
62847a8cc9
|
@ -430,12 +430,11 @@ else
|
|||
return res
|
||||
enddef
|
||||
|
||||
def airline#highlighter#get_highlight2(fg: list<string>, bg: list<string>, rest1: string = '', rest2: string = '', rest3: string = ''): list<string>
|
||||
def airline#highlighter#get_highlight2(fg: list<string>, bg: list<string>, ...rest: list<string>): list<string>
|
||||
var guifg = s:get_syn(fg[0], fg[1], 'gui')
|
||||
var guibg = s:get_syn(bg[0], bg[1], 'gui')
|
||||
var ctermfg = s:get_syn(fg[0], fg[1], 'cterm')
|
||||
var ctermbg = s:get_syn(bg[0], bg[1], 'cterm')
|
||||
var rest = [ rest1, rest2, rest3 ]
|
||||
return s:get_array(guifg, guibg, ctermfg, ctermbg, filter(rest, (_, v) => !empty(v)))
|
||||
enddef
|
||||
|
||||
|
|
|
@ -104,12 +104,12 @@ else
|
|||
return palette
|
||||
enddef
|
||||
|
||||
def airline#themes#get_highlight(group: string): list<string>
|
||||
return call('airline#highlighter#get_highlight', [group])
|
||||
def airline#themes#get_highlight(group: string, ...modifiers: list<string>): list<string>
|
||||
return call('airline#highlighter#get_highlight', [group, modifiers])
|
||||
enddef
|
||||
|
||||
def airline#themes#get_highlight2(fg: list<string>, bg: list<string>): list<string>
|
||||
return call('airline#highlighter#get_highlight2', [fg, bg])
|
||||
def airline#themes#get_highlight2(fg: list<string>, bg: list<string>, ...modifiers: list<string>): list<string>
|
||||
return call('airline#highlighter#get_highlight2', [fg, bg] + modifiers)
|
||||
enddef
|
||||
|
||||
def airline#themes#patch(palette: dict<any>): void
|
||||
|
|
Loading…
Reference in New Issue