only set laststatus when airline is not on top

When airline is configured to show on top (`let g:airline_statusline_ontop = 1`)
and vim's `laststatus` option is configured to be hidden (`set laststatus=0`)
then there is no need to override its setting.
This commit is contained in:
Pierre-Nicolas Clauss 2022-12-16 08:28:29 +01:00
parent 994cfd80eb
commit 46e517e8c2
No known key found for this signature in database
GPG Key ID: BED1B8A689160C89

View File

@ -185,7 +185,9 @@ function! s:airline_toggle()
if !airline#util#stl_disabled(winnr())
if &laststatus < 2
let _scroll=&scroll
set laststatus=2
if !get(g:, 'airline_statusline_ontop', 0)
set laststatus=2
endif
if &scroll != _scroll
let &scroll = _scroll
endif