do not add padding to section name if empty

This commit is contained in:
Cenk Alti 2016-05-08 04:52:35 +03:00
parent 30f078daf5
commit 2d7f5b2cc1
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,10 @@ function! s:prototype.split(...)
endfunction
function! s:prototype.add_section_spaced(group, contents)
call self.add_section(a:group, (g:airline_symbols.space).a:contents.(g:airline_symbols.space))
if a:contents
let a:contents = (g:airline_symbols.space).a:contents.(g:airline_symbols.space)
endif
call self.add_section(a:group, a:contents)
endfunction
function! s:prototype.add_section(group, contents)