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:
parent
6ab14bf474
commit
b84e548522
|
@ -231,7 +231,7 @@ function! airline#extensions#tabline#add_label(dict, type)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#tabline#add_tab_label(dict)
|
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('$')))
|
call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$')))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
@ -813,6 +813,9 @@ with the middle mouse button to delete that buffer.
|
||||||
|
|
||||||
* enable/disable displaying tabs, regardless of number. (c) >
|
* enable/disable displaying tabs, regardless of number. (c) >
|
||||||
let g:airline#extensions#tabline#show_tabs = 1
|
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. >
|
* configure filename match rules to exclude from the tabline. >
|
||||||
let g:airline#extensions#tabline#excludes = []
|
let g:airline#extensions#tabline#excludes = []
|
||||||
|
|
Loading…
Reference in New Issue