From 2d7f5b2cc1266d55406a489dc253c135d756d9e3 Mon Sep 17 00:00:00 2001 From: Cenk Alti Date: Sun, 8 May 2016 04:52:35 +0300 Subject: [PATCH] do not add padding to section name if empty --- autoload/airline/builder.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/airline/builder.vim b/autoload/airline/builder.vim index 217fda9..65a1f69 100644 --- a/autoload/airline/builder.vim +++ b/autoload/airline/builder.vim @@ -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)