From 6ba65b2c8c7df8bca6be3ba1eabda7dcd466cd0b Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 4 Jan 2018 14:30:16 +0100 Subject: [PATCH] tabline: remove s:show_tab_type variable --- autoload/airline/extensions/tabline/buffers.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index dc95cf4e..a1858a1a 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -3,7 +3,6 @@ scriptencoding utf-8 -let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1) let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') let s:keymap_ignored_filetypes = get(g:, 'airline#extensions#tabline#keymap_ignored_filetypes', ['vimfiler', 'nerdtree']) let s:spc = g:airline_symbols.space @@ -80,6 +79,7 @@ function! airline#extensions#tabline#buffers#get() if has("tablineat") call b.add_raw('%'.nr.'@airline#extensions#tabline#buffers#clickbuf@') endif + if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1) if len(s:number_map) > 0 call b.add_section(group, s:spc . get(s:number_map, index, '') . '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)' . s:spc) @@ -90,6 +90,7 @@ function! airline#extensions#tabline#buffers#get() else call b.add_section(group, s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.s:spc) endif + if has("tablineat") call b.add_raw('%X') endif @@ -98,9 +99,10 @@ function! airline#extensions#tabline#buffers#get() call b.add_section('airline_tabfill', '') call b.split() call b.add_section('airline_tabfill', '') - if s:show_tab_type + if get(g:, 'airline#extensions#tabline#show_tab_type', 1) call b.add_section_spaced('airline_tabtype', s:buffers_label) endif + if tabpagenr('$') > 1 call b.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) endif