From 5907d3909e7063d471706587aeb91d3cea4f9853 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Thu, 15 Mar 2018 01:23:43 +0000 Subject: [PATCH] Add dedicated tabline builder --- autoload/airline/extensions/tabline.vim | 2 +- autoload/airline/extensions/tabline/builder.vim | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 autoload/airline/extensions/tabline/builder.vim diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 9700023..52cf19b 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -181,7 +181,7 @@ function! airline#extensions#tabline#new_builder() let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') endif - return airline#builder#new(builder_context) + return airline#extensions#tabline#builder#new(builder_context) endfunction function! airline#extensions#tabline#group_of_bufnr(tab_bufs, bufnr) diff --git a/autoload/airline/extensions/tabline/builder.vim b/autoload/airline/extensions/tabline/builder.vim new file mode 100644 index 0000000..681026f --- /dev/null +++ b/autoload/airline/extensions/tabline/builder.vim @@ -0,0 +1,12 @@ +" MIT License. Copyright (c) 2013-2018 Bailey Ling et al. +" vim: et ts=2 sts=2 sw=2 + +scriptencoding utf-8 + +let s:prototype = {} + +function! airline#extensions#tabline#builder#new(context) + let builder = airline#builder#new(a:context) + call extend(builder, s:prototype, 'force') + return builder +endfunction