mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-08 04:54:44 +08:00
highlighter: vim9 script implementation of load_theme
This commit is contained in:
committed by
Christian Brabandt
parent
4f8675434a
commit
798a346a91
@@ -501,4 +501,18 @@ else
|
||||
dict[group] = colors
|
||||
airline#highlighter#exec(group, colors)
|
||||
enddef
|
||||
def airline#highlighter#load_theme(): void # {{{2
|
||||
if pumvisible()
|
||||
return
|
||||
endif
|
||||
for winnr in filter(range(1, winnr('$')), {_, v -> v != winnr()})
|
||||
airline#highlighter#highlight_modified_inactive(winbufnr(winnr))
|
||||
endfor
|
||||
airline#highlighter#highlight(['inactive'])
|
||||
if getbufvar( bufnr('%'), '&modified' )
|
||||
airline#highlighter#highlight(['normal', 'modified'])
|
||||
else
|
||||
airline#highlighter#highlight(['normal'])
|
||||
endif
|
||||
enddef
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user