mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 06:31:46 +08:00
collapse section when it is empty text (#70).
This commit is contained in:
parent
e4d5f4cfb1
commit
926be0bd8a
|
@ -60,7 +60,7 @@ endfunction
|
|||
|
||||
function! s:get_section(winnr, key, ...)
|
||||
let text = s: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, '%( '), get(a:000, 1, ' %)')]
|
||||
return empty(text) ? '' : prefix.text.suffix
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user