From a4840f1585c4d22ddbfbef589c398bbe4d3b6c4b Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 12 May 2016 21:34:29 +0200 Subject: [PATCH] fix adding space padding to section caused by PR1157 fixes #1158 --- autoload/airline/builder.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/autoload/airline/builder.vim b/autoload/airline/builder.vim index 65a1f69..4176c81 100644 --- a/autoload/airline/builder.vim +++ b/autoload/airline/builder.vim @@ -8,10 +8,8 @@ function! s:prototype.split(...) endfunction function! s:prototype.add_section_spaced(group, contents) - 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) + let spc = empty(a:contents) ? '' : g:airline_symbols.space + call self.add_section(a:group, spc.a:contents.spc) endfunction function! s:prototype.add_section(group, contents)