diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index ea19df1..d6993d3 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -58,7 +58,6 @@ function! airline#extensions#tabline#buffers#get() endif endif - let index = 1 let b = airline#extensions#tabline#new_builder() let tab_bufs = tabpagebuflist(tabpagenr()) let show_buf_label_first = 0 @@ -116,9 +115,9 @@ function! airline#extensions#tabline#buffers#get() if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) if len(s:number_map) > 0 - return space. get(s:number_map, a:i, '') . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc + return space. get(s:number_map, a:i+1, '') . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc else - return '['.a:i.s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' + return '['.(a:i+1).s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' endif else return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc