Add padding spaces for section in s:get_section.
When section text is non-empty, pad spaces before/after it.
This commit is contained in:
parent
5099fbf1b9
commit
dcb7196097
|
@ -94,7 +94,8 @@ function! s:getwinvar(winnr, key, ...)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_section(winnr, key)
|
function! s:get_section(winnr, key)
|
||||||
return s:getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
|
let text = s:getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
|
||||||
|
return empty(text) ? '' : ' '.text.' '
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_statusline(winnr, active)
|
function! s:get_statusline(winnr, active)
|
||||||
|
|
Loading…
Reference in New Issue