提交 9b113a02 编写于 作者: K kazukazuinaina

[refactor] use Ternary operator

上级 49cdcb7b
......@@ -76,17 +76,14 @@ else
endfunction
endif
function! airline#extensions#default#apply(builder, context)
function! airline#extensions#default#apply(builder, context) abort
let winnr = a:context.winnr
let active = a:context.active
if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse))
call s:build_sections(a:builder, a:context, s:layout[0])
else
let text = s:get_section(winnr, 'c')
if empty(text)
let text = ' %f%m '
endif
let text = !empty(s:get_section(winnr, 'c')) ? s:get_section(winnr, 'c') : ' %f%m '
call a:builder.add_section('airline_c'.(a:context.bufnr), text)
endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册