add 'g:airline#extensions#tabline#tabtitle_formatter' option

The option can be used to specify a customized format() function to display tab title in tab mode
This commit is contained in:
huanhuan_zhuang authored and Christian Brabandt committed 2020-08-25 13:42:18 +02:00
1 parent 3a55368320
commit 5d3cfa4045
2 files changed
+29

No files matched your search

+5
View File
@@ -186,6 +186,11 @@ function! airline#extensions#tabline#title(n)
let title = gettabvar(a:n, 'title')
endif
let formatter = get(g:, 'airline#extensions#tabline#tabtitle_formatter')
if empty(title) && formatter !=# '' && exists("*".formatter)
let title = call(formatter, [a:n])
endif
if empty(title)
let buflist = tabpagebuflist(a:n)
let winnr = tabpagewinnr(a:n)