diff --git a/autoload/airline/extensions/tabline/formatters/tabnr.vim b/autoload/airline/extensions/tabline/formatters/tabnr.vim index f0836525..8cd500d8 100644 --- a/autoload/airline/extensions/tabline/formatters/tabnr.vim +++ b/autoload/airline/extensions/tabline/formatters/tabnr.vim @@ -4,12 +4,14 @@ scriptencoding utf-8 function! airline#extensions#tabline#formatters#tabnr#format(tab_nr_type, nr) + " TODO: Is this actually useful? Or should we remove this one? + let nr = type(a:nr) == type([]) ? a:nr[0] : a:nr let spc=g:airline_symbols.space if a:tab_nr_type == 0 " nr of splits - return spc. '%{len(tabpagebuflist('.a:nr.'))}' + return spc. '%{len(tabpagebuflist('.nr.'))}' elseif a:tab_nr_type == 1 " tab number - return spc. a:nr + return spc. nr else "== 2 splits and tab number - return spc. a:nr. '.%{len(tabpagebuflist('.a:nr.'))}' + return spc. nr. '.%{len(tabpagebuflist('.nr.'))}' endif endfunction