replace all instance of space with the no-break space. resolves #256.

This commit is contained in:
bling
2013-09-22 11:29:27 -04:00
parent b22190400d
commit bfe35ed76c
9 changed files with 21 additions and 12 deletions

View File

@@ -11,6 +11,7 @@ let s:layout = get(g:, 'airline#extensions#default#layout', [
\ [ 'a', 'b', 'c' ],
\ [ 'x', 'y', 'z', 'warning' ]
\ ])
let s:spc = g:airline_symbols.space
function! s:get_section(winnr, key, ...)
if has_key(s:section_truncate_width, a:key)
@@ -19,7 +20,7 @@ function! s:get_section(winnr, key, ...)
endif
endif
let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
let [prefix, suffix] = [get(a:000, 0, '%( '), get(a:000, 1, ' %)')]
let [prefix, suffix] = [get(a:000, 0, '%('.s:spc), get(a:000, 1, s:spc.'%)')]
return empty(text) ? '' : prefix.text.suffix
endfunction