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
This commit is contained in:
Christian Brabandt 2018-11-08 12:40:46 +01:00
parent 71dc6f0257
commit 496de8b745
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

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