mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-24 22:45:12 +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
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user