Merge pull request #1702 from mrmr1993/fix-buffer-counts
Fix buffer numbering to start from 1 with buffer_idx_mode
This commit is contained in:
commit
47bdae9067
@ -58,7 +58,6 @@ function! airline#extensions#tabline#buffers#get()
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let index = 1
|
|
||||||
let b = airline#extensions#tabline#new_builder()
|
let b = airline#extensions#tabline#new_builder()
|
||||||
let tab_bufs = tabpagebuflist(tabpagenr())
|
let tab_bufs = tabpagebuflist(tabpagenr())
|
||||||
let show_buf_label_first = 0
|
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 get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0)
|
||||||
if len(s:number_map) > 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
|
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
|
endif
|
||||||
else
|
else
|
||||||
return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc
|
return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc
|
||||||
|
Loading…
Reference in New Issue
Block a user