mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 14:47:18 +08:00
Add padding spaces for section in s:get_section.
When section text is non-empty, pad spaces before/after it.
This commit is contained in:
parent
5099fbf1b9
commit
dcb7196097
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user