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.
This commit is contained in:
Christian Brabandt 2018-11-08 13:32:20 +01:00
parent 496de8b745
commit d57344a3c3
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -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