tabline: do not show buffer label if show_buffers is zero

fixes #1689
This commit is contained in:
Christian Brabandt 2018-03-19 15:06:55 +01:00
parent 700c9b9740
commit ecff00a559
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -88,7 +88,9 @@ function! airline#extensions#tabline#tabs#get()
let group = airline#extensions#tabline#group_of_bufnr(buffers, nr) . "_right" let group = airline#extensions#tabline#group_of_bufnr(buffers, nr) . "_right"
call b.add_section_spaced(group, '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)') call b.add_section_spaced(group, '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)')
endfor endfor
call airline#extensions#tabline#add_label(b, 'buffers') if get(g:, 'airline#extensions#tabline#show_buffers', 1)
call airline#extensions#tabline#add_label(b, 'buffers')
endif
endif endif
let s:current_bufnr = curbuf let s:current_bufnr = curbuf