mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-01-10 05:22:21 +08:00
Do not draw separators for empty sections
This is a little bit a hack, because by the time the separators are added, it is not clear, if the following section is empty, therefore we need to parse the content of the following section and eval the expressions to find out, if this is empty Remarks: - catch all exceptions when eval'ing statusline - make sure, that the seperators are highlighted even when skipping empty regions (highlight group names need to be adjusted) - if a section is defined as empty, it will be removed completly from the statusline. This means, it won't be called on the next update and may not refresh properly (e.g. when the whitespace check triggers, therefore, the whitesapce extension has to call an explicit redraw whenever it is supposed to be refreshed)
This commit is contained in:
@@ -140,6 +140,10 @@ values):
|
||||
* disable the Airline customization for selective windows (this is a
|
||||
window-local variable so you can disable it for only some windows) >
|
||||
let w:airline_disabled = 1
|
||||
|
||||
* Do not draw separators for empty sections (only for the active window)
|
||||
>
|
||||
let g:airline_skip_empty_sections = 1
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user