From d57344a3c360c0d382d1b8fc8a8bfa72b7f952a1 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 8 Nov 2018 13:32:20 +0100 Subject: [PATCH] highlighter: skip more buffer related hi groups Previously, we only checked for if the name starts with 'airline_c' But there could as well be highlighting groups starting being called 'airline_b_to_airline_c5', but if buffer 5 is no longer visible in the current viewport, then we do not need to recreate those groups. --- autoload/airline/highlighter.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 9817014..5e8a785 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -254,7 +254,7 @@ function! airline#highlighter#highlight(modes, ...) endif " do not re-create highlighting for buffers that are no longer visible " in the current tabpage - if name[0:8] is# 'airline_c' + if name =~# 'airline_c\d\+' let bnr = matchstr(name, 'airline_c\zs\d\+') + 0 if bnr > 0 && index(buffers_in_tabpage, bnr) == -1 continue