whitespace: support multiline statusline for warnings

Add a new airline_section_warning2 that displays whitespace warnings on
a second statusline line when Vim supports the statuslineopt option
(Vim 9.2.0083+) and g:airline_multiline is set. The second line only
appears when there are actual whitespace issues, avoiding an empty
second line when the buffer is clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2026-04-12 08:15:15 +00:00
parent 7fe264257e
commit ee44d57525
7 changed files with 77 additions and 16 deletions
+3
View File
@@ -203,6 +203,9 @@ function! s:airline_toggle()
endif
endif
endif
if airline#util#has_multiline() && &statuslineopt !~ 'maxheight:'
set statuslineopt+=maxheight:2
endif
if s:airline_initialized
call s:on_window_changed('Init')
endif