tabline: Vim9 script implementation of add_label

This commit is contained in:
Christian 2020-11-18 17:33:35 +01:00 committed by Christian Brabandt
parent c8c30c9e3e
commit 6ff95bac4e
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -451,4 +451,10 @@ else
endif
return group
enddef
def airline#extensions#tabline#add_label(dict: dict<any>, type: string, right: number): void # {{{2
if get(g:, 'airline#extensions#tabline#show_tab_type', 1)
dict.add_section_spaced('airline_tablabel' .. (right ? '_right' : ''),
get(g:, 'airline#extensions#tabline#' .. type .. '_label', type))
endif
enddef
endif