mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-08-02 14:10:27 +08:00
Make skip_empty variable overridable per window
The denite extension functions return the content of some buffer-local variables. Those variables are not defined, the first time the they are accessed and therefore, the statusline is not updated later when g:airline_skip_empty_sections is set. So disable this variable in this window, by setting the w:airline_skip_empty_section=0 variable in the denite window. closes #1454
This commit is contained in:
@@ -161,6 +161,11 @@ function! s:section_is_empty(self, content)
|
||||
if get(g:, 'airline_skip_empty_sections', 0) == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
" only check, if airline#skip_empty_sections == 1
|
||||
if get(w:, 'airline_skip_empty_sections', 0) == 0
|
||||
return 0
|
||||
endif
|
||||
" assume accents sections to be never empty
|
||||
" (avoides, that on startup the mode message becomes empty)
|
||||
if match(a:content, '%#__accent_[^#]*#.*__restore__#') > -1
|
||||
|
||||
Reference in New Issue
Block a user