From 798a346a9198203b4b291a08e67b5cfc10e630bf Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 18 Nov 2020 11:13:16 +0100 Subject: [PATCH] highlighter: vim9 script implementation of load_theme --- autoload/airline/highlighter.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 30d8dd81..48de8406 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -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