From 496de8b74596a6e24eded506a2e8d7e5e87265f6 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 8 Nov 2018 12:40:46 +0100 Subject: [PATCH] highlighter: do not skip empty c_sections currently, if the matchstr() evaluates to '', it would skip the required section, because bnr would be evaluated to zero and since there is no buffer zero, skip that highlighting group. Make sure, to only skip the highlighting group if the buffer number is actually > 0 --- 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 97c6595..9817014 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -256,7 +256,7 @@ function! airline#highlighter#highlight(modes, ...) " in the current tabpage if name[0:8] is# 'airline_c' let bnr = matchstr(name, 'airline_c\zs\d\+') + 0 - if index(buffers_in_tabpage, bnr) == -1 + if bnr > 0 && index(buffers_in_tabpage, bnr) == -1 continue endif endif