mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-07 04:34:26 +08:00
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:
@@ -256,7 +256,7 @@ function! airline#highlighter#highlight(modes, ...)
|
|||||||
" in the current tabpage
|
" in the current tabpage
|
||||||
if name[0:8] is# 'airline_c'
|
if name[0:8] is# 'airline_c'
|
||||||
let bnr = matchstr(name, 'airline_c\zs\d\+') + 0
|
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
|
continue
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user