From 825aec9e4d70feb0037af48aec9dd491505cd440 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 27 Jun 2017 14:44:49 +0200 Subject: [PATCH] Revert "highlight: skip processing the same hi group twice" This reverts commit feee9bcf3cf13c3c4a89327ba32e96123cfc9205. It brakes CI and shouldn't be needed --- autoload/airline.vim | 6 ------ autoload/airline/extensions/tabline.vim | 19 +++++++------------ autoload/airline/highlighter.vim | 7 ------- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 2772f20b..d54fe036 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -47,9 +47,7 @@ function! airline#load_theme() endif call airline#highlighter#load_theme() - let g:airline_theme_dict = {} call airline#extensions#load_theme() - unlet g:airline_theme_dict call airline#update_statusline() endfunction @@ -104,7 +102,6 @@ function! airline#update_statusline() if airline#util#getwinvar(winnr(), 'airline_disabled', 0) return endif - let g:airline_theme_dict={} for nr in filter(range(1, winnr('$')), 'v:val != winnr()') if airline#util#getwinvar(nr, 'airline_disabled', 0) continue @@ -120,7 +117,6 @@ function! airline#update_statusline() let w:airline_active = 1 let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) - unlet g:airline_theme_dict endfunction let s:contexts = {} @@ -202,11 +198,9 @@ function! airline#check_mode(winnr) return '' endif if get(w:, 'airline_lastmode', '') != mode_string - let g:airline_theme_dict = {} call airline#highlighter#highlight_modified_inactive(context.bufnr) call airline#highlighter#highlight(l:mode, context.bufnr) let w:airline_lastmode = mode_string - unlet g:airline_theme_dict endif return '' diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 156f7aa0..a97cbe12 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -118,18 +118,13 @@ function! airline#extensions#tabline#get() if !exists('#airline#BufAdd#*') autocmd airline BufAdd * call update_tabline() endif - try - let g:airline_theme_dict = {} - if s:ctrlspace - return airline#extensions#tabline#ctrlspace#get() - elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs - return airline#extensions#tabline#buffers#get() - else - return airline#extensions#tabline#tabs#get() - endif - finally - unlet g:airline_theme_dict - endtry + if s:ctrlspace + return airline#extensions#tabline#ctrlspace#get() + elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs + return airline#extensions#tabline#buffers#get() + else + return airline#extensions#tabline#tabs#get() + endif endfunction function! airline#extensions#tabline#title(n) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index a389f826..631f311e 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -84,10 +84,6 @@ function! airline#highlighter#exec(group, colors) if len(colors) == 4 call add(colors, '') endif - if has_key(g:airline_theme_dict, 'a:group') && - \ get(g:airline_theme_dict[a:group]) == a:colors - return - endif if g:airline_gui_mode ==# 'gui' let new_hi = [colors[0], colors[1], '', '', colors[4]] else @@ -102,7 +98,6 @@ function! airline#highlighter#exec(group, colors) \ s:Get(colors, 4, 'term=', '')) exe cmd endif - let g:airline_theme_dict[a:group] = a:colors endfunction function! s:CheckDefined(colors) @@ -165,7 +160,6 @@ function! airline#highlighter#load_theme() if pumvisible() return endif - let g:airline_theme_dict = {} for winnr in filter(range(1, winnr('$')), 'v:val != winnr()') call airline#highlighter#highlight_modified_inactive(winbufnr(winnr)) endfor @@ -175,7 +169,6 @@ function! airline#highlighter#load_theme() else call airline#highlighter#highlight(['normal']) endif - unlet g:airline_theme_dict endfunction function! airline#highlighter#add_separator(from, to, inverse)