mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-08-17 21:28:00 +08:00
tabline for combined buffers/tabs
This is a new tabline extension, that displays both the buffers open and the available tabs. This has been requested by #639 and fixes #639. This is based on blings work on branch spike. This uses the new highlight groups tab*_right, so that the separators have the correct color. Also this makes some configuration variable obsolete and therefore, they have been removed. remove unused combined config variable, remove space after tab
This commit is contained in:
committed by
Christian Brabandt
parent
1dc8eac3d2
commit
e4ef624ea8
@@ -62,23 +62,7 @@ function! airline#extensions#tabline#buffers#get()
|
||||
continue
|
||||
endif
|
||||
|
||||
if cur == nr
|
||||
if g:airline_detect_modified && getbufvar(nr, '&modified')
|
||||
let group = 'airline_tabmod'
|
||||
else
|
||||
let group = 'airline_tabsel'
|
||||
endif
|
||||
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0
|
||||
else
|
||||
if g:airline_detect_modified && getbufvar(nr, '&modified')
|
||||
let group = 'airline_tabmod_unsel'
|
||||
elseif index(tab_bufs, nr) > -1
|
||||
let group = 'airline_tab'
|
||||
else
|
||||
let group = 'airline_tabhid'
|
||||
endif
|
||||
endif
|
||||
|
||||
let group = airline#extensions#tabline#group_of_bufnr(tab_bufs, nr)
|
||||
if s:buffer_idx_mode
|
||||
if len(s:number_map) > 0
|
||||
call b.add_section(group, s:spc . get(s:number_map, l:index, '') . '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)' . s:spc)
|
||||
|
||||
Reference in New Issue
Block a user