mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-05-24 09:18:33 +08:00
tabline: refactor label function
This commit is contained in:
@@ -201,3 +201,10 @@ function! airline#extensions#tabline#group_of_bufnr(tab_bufs, bufnr)
|
||||
endif
|
||||
return group
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#tabline#add_label(dict, type)
|
||||
if get(g:, 'airline#extensions#tabline#show_tab_type', 1)
|
||||
call a:dict.add_section_spaced('airline_tab',
|
||||
\ get(g:, 'airline#extensions#tabline#'.a:type.'_label', '['.a:type.']'))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user