From dcb71960975e388d6cce8f1b6d0ca4f3bbf06829 Mon Sep 17 00:00:00 2001 From: bootleq Date: Sat, 3 Aug 2013 09:17:53 +0800 Subject: [PATCH] Add padding spaces for section in s:get_section. When section text is non-empty, pad spaces before/after it. --- autoload/airline.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 5f0e653c..09e800a0 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -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)