From ac799f6021cc9988d3de690b259b73daa5645d6d Mon Sep 17 00:00:00 2001 From: Hana Shiro Date: Sat, 2 Jun 2018 13:49:32 +0800 Subject: [PATCH] Rename parameters for better readability --- autoload/airline/extensions/tabline/ctrlspace.vim | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/autoload/airline/extensions/tabline/ctrlspace.vim b/autoload/airline/extensions/tabline/ctrlspace.vim index 39ab23a..4cad3a3 100644 --- a/autoload/airline/extensions/tabline/ctrlspace.vim +++ b/autoload/airline/extensions/tabline/ctrlspace.vim @@ -25,10 +25,8 @@ function! airline#extensions#tabline#ctrlspace#invalidate() let s:current_tabnr = -1 endfunction -function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pos) - let pos_extension = (a:pos == 0) - \ ? '' - \ : '_right' +function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') let s:buffer_list = ctrlspace#api#BufferList(a:cur_tab) " add by tenfy(tenfyzhong@qq.com) @@ -71,10 +69,8 @@ function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_t return 1 endfunction -function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pos) - let pos_extension = (a:pos == 0) - \ ? '' - \ : '_right' +function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pull_right) + let pos_extension = (a:pull_right ? '_right' : '') for tab in s:tab_list if tab.current