Make displaying the tab count optional

Set the g:airline#extensions#tabline#show_tab_count to zero to disable.

fixes complaints at #1882
This commit is contained in:
Christian Brabandt 2019-03-16 09:32:18 +01:00
parent 6ab14bf474
commit b84e548522
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 4 additions and 1 deletions

View File

@ -231,7 +231,7 @@ function! airline#extensions#tabline#add_label(dict, type)
endfunction
function! airline#extensions#tabline#add_tab_label(dict)
if tabpagenr('$') > 1
if get(g:, 'airline#extensions#tabline#show_tab_count', 1) && tabpagenr('$') > 1
call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$')))
endif
endfunction

View File

@ -813,6 +813,9 @@ with the middle mouse button to delete that buffer.
* enable/disable displaying tabs, regardless of number. (c) >
let g:airline#extensions#tabline#show_tabs = 1
* enable/disable displaying number of tabs in the right side (c) >
let g:airline#extensions#tabline#show_tab_count = 1
<
* configure filename match rules to exclude from the tabline. >
let g:airline#extensions#tabline#excludes = []