From 0b47adf0872ea238c0b049ded62ec17394c4c5f4 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Mon, 19 Mar 2018 14:27:06 +0000 Subject: [PATCH] Rename tab -> title in tabline/builder method names --- autoload/airline/extensions/tabline/buffers.vim | 2 +- autoload/airline/extensions/tabline/builder.vim | 12 ++++++------ autoload/airline/extensions/tabline/tabs.vim | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index a9dfe3b..512d517 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -126,7 +126,7 @@ function! airline#extensions#tabline#buffers#get() endfunction let last_buffer = len(b.buffers) - 1 - call b.insert_tabs(index(b.buffers, cur), 0, last_buffer) + call b.insert_titles(index(b.buffers, cur), 0, last_buffer) call b.add_section('airline_tabfill', '') call b.split() diff --git a/autoload/airline/extensions/tabline/builder.vim b/autoload/airline/extensions/tabline/builder.vim index 03c09ff..1a09a59 100644 --- a/autoload/airline/extensions/tabline/builder.vim +++ b/autoload/airline/extensions/tabline/builder.vim @@ -5,7 +5,7 @@ scriptencoding utf-8 let s:prototype = {} -function! s:prototype.insert_tabs(curtab, first_tab, last_tab) dict +function! s:prototype.insert_titles(curtab, first_tab, last_tab) dict let self._first_tab = a:first_tab let self._last_tab = a:last_tab let self._left_tab = a:curtab @@ -14,7 +14,7 @@ function! s:prototype.insert_tabs(curtab, first_tab, last_tab) dict let self._right_position = self._left_position endfunction -function! s:prototype.try_insert_tab(tab, group, pos, sep_size, force) dict +function! s:prototype.try_insert_title(tab, group, pos, sep_size, force) dict let tab_title = self.get_title(a:tab) let self._remaining_space -= s:strchars(s:evaluate_tabline(tab_title)) + a:sep_size if a:force || self._remaining_space >= 0 @@ -81,7 +81,7 @@ function! s:prototype.build() dict let left_group = group let right_group = group let self._left_tab -= - \ self.try_insert_tab(self._left_tab, group, self._left_position, sep_change, 1) + \ self.try_insert_title(self._left_tab, group, self._left_position, sep_change, 1) if get(g:, 'airline#extensions#tabline#current_first', 0) " always have current tabpage first @@ -95,7 +95,7 @@ function! s:prototype.build() dict \ s:get_separator_change(group, right_group, outer_right_group, sep_size, alt_sep_size) let right_group = group let self._right_tab += - \ self.try_insert_tab(self._right_tab, group, self._right_position, sep_change, 1) + \ self.try_insert_title(self._right_tab, group, self._right_position, sep_change, 1) endif while self._remaining_space > 0 @@ -105,7 +105,7 @@ function! s:prototype.build() dict let sep_change = \ s:get_separator_change(group, left_group, outer_left_group, sep_size, alt_sep_size) let left_group = group - let done = self.try_insert_tab(self._left_tab, group, self._left_position, sep_change, 0) + let done = self.try_insert_title(self._left_tab, group, self._left_position, sep_change, 0) let self._left_tab -= done endif if self._right_tab <= self._last_tab && (center_active || !done) @@ -113,7 +113,7 @@ function! s:prototype.build() dict let sep_change = \ s:get_separator_change(group, right_group, outer_right_group, sep_size, alt_sep_size) let right_group = group - let done = self.try_insert_tab(self._right_tab, group, self._right_position, sep_change, 0) + let done = self.try_insert_title(self._right_tab, group, self._right_position, sep_change, 0) let self._right_tab += done endif if !done diff --git a/autoload/airline/extensions/tabline/tabs.vim b/autoload/airline/extensions/tabline/tabs.vim index 9e3270d..e32cc4a 100644 --- a/autoload/airline/extensions/tabline/tabs.vim +++ b/autoload/airline/extensions/tabline/tabs.vim @@ -71,7 +71,7 @@ function! airline#extensions#tabline#tabs#get() return val.'%'.a:i.'T %{airline#extensions#tabline#title('.a:i.')} %)' endfunction - call b.insert_tabs(curtab, 1, tabpagenr('$')) + call b.insert_titles(curtab, 1, tabpagenr('$')) call b.add_section('airline_tabfill', '') call b.split()