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
1 changed files with 2 additions and 1 deletions

View File

@ -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)