2021-01-01 20:57:00 +08:00
|
|
|
" MIT License. Copyright (c) 2017-2021 Christian Brabandt et al.
|
2018-01-05 03:41:55 +08:00
|
|
|
" vim: et ts=2 sts=2 sw=2
|
|
|
|
|
|
|
|
scriptencoding utf-8
|
|
|
|
|
|
|
|
function! airline#extensions#tabline#formatters#tabnr#format(tab_nr_type, nr)
|
2019-02-03 00:45:33 +08:00
|
|
|
let spc=g:airline_symbols.space
|
2018-01-05 03:41:55 +08:00
|
|
|
if a:tab_nr_type == 0 " nr of splits
|
2019-02-03 00:45:33 +08:00
|
|
|
return spc. '%{len(tabpagebuflist('.a:nr.'))}'
|
2018-01-05 03:41:55 +08:00
|
|
|
elseif a:tab_nr_type == 1 " tab number
|
2019-02-03 00:45:33 +08:00
|
|
|
return spc. a:nr
|
2018-01-05 03:41:55 +08:00
|
|
|
else "== 2 splits and tab number
|
2019-02-03 00:45:33 +08:00
|
|
|
return spc. a:nr. '.%{len(tabpagebuflist('.a:nr.'))}'
|
2018-01-05 03:41:55 +08:00
|
|
|
endif
|
|
|
|
endfunction
|