add feedback from PR

This commit is contained in:
Christian Brabandt 2016-02-15 20:01:34 +01:00
parent 2c5aa75d5f
commit a2f54ef6e6
1 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,8 @@
" vim: et ts=2 sts=2 sw=2
let s:show_close_button = get(g:, 'airline#extensions#tabline#show_close_button', 1)
let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1)
let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0)
let s:close_symbol = get(g:, 'airline#extensions#tabline#close_symbol', 'X')
let s:spc = g:airline_symbols.space
@ -63,7 +65,17 @@ function! airline#extensions#tabline#tabs#get()
else
let group = 'airline_tab_right'
endif
call b.add_section_spaced(group, '%'.i.'Ttab '.i)
let val = '%('
if s:show_tab_nr
if s:tab_nr_type == 0
let val .= (g:airline_symbols.space).'%{len(tabpagebuflist('.i.'))}'
elseif s:tab_nr_type == 1
let val .= (g:airline_symbols.space).i
else "== 2
let val .= (g:airline_symbols.space).i.'.%{len(tabpagebuflist('.i.'))}'
endif
endif
call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)')
endfor
call b.add_raw('%<')