mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-26 23:44:30 +02:00
highlighter: vim9 script implementation of s:exec_separator
This commit is contained in:
parent
7310ca6cbf
commit
5391b3e246
@ -485,4 +485,20 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
enddef
|
enddef
|
||||||
|
def s:exec_separator(dict: dict<string>, from: string, to: string, inverse: bool, suffix: string): void # {{{2
|
||||||
|
if pumvisible()
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
var group = from .. '_to_' .. to .. suffix
|
||||||
|
var from = airline#themes#get_highlight(from .. suffix)
|
||||||
|
var colors = []
|
||||||
|
var to = airline#themes#get_highlight(to .. suffix)
|
||||||
|
if inverse
|
||||||
|
colors = [ from[1], to[1], from[3], to[3] ]
|
||||||
|
else
|
||||||
|
colors = [ to[1], from[1], to[3], from[3] ]
|
||||||
|
endif
|
||||||
|
dict[group] = colors
|
||||||
|
airline#highlighter#exec(group, colors)
|
||||||
|
enddef
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user