Use ternary-operator
This commit is contained in:
parent
08570b6dcb
commit
92bf1b0b39
@ -26,11 +26,9 @@ function! airline#extensions#tabline#ctrlspace#invalidate()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pos)
|
function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pos)
|
||||||
if a:pos == 0
|
let pos_extension = (a:pos == 0)
|
||||||
let pos_extension = ''
|
\ ? ''
|
||||||
else
|
\ : '_right'
|
||||||
let pos_extension = '_right'
|
|
||||||
endif
|
|
||||||
|
|
||||||
let s:buffer_list = ctrlspace#api#BufferList(a:cur_tab)
|
let s:buffer_list = ctrlspace#api#BufferList(a:cur_tab)
|
||||||
" add by tenfy(tenfyzhong@qq.com)
|
" add by tenfy(tenfyzhong@qq.com)
|
||||||
@ -74,11 +72,9 @@ function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_t
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pos)
|
function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pos)
|
||||||
if a:pos == 0
|
let pos_extension = (a:pos == 0)
|
||||||
let pos_extension = ''
|
\ ? ''
|
||||||
else
|
\ : '_right'
|
||||||
let pos_extension = '_right'
|
|
||||||
endif
|
|
||||||
|
|
||||||
for tab in s:tab_list
|
for tab in s:tab_list
|
||||||
if tab.current
|
if tab.current
|
||||||
|
Loading…
Reference in New Issue
Block a user