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:
bootleq 2013-08-03 09:17:53 +08:00
parent 5099fbf1b9
commit dcb7196097

View File

@ -94,7 +94,8 @@ function! s:getwinvar(winnr, key, ...)
endfunction
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
function! s:get_statusline(winnr, active)