fix missing check for w:airline_disable_statusline

This commit is contained in:
midchildan 2019-12-22 20:06:35 +09:00
parent b93492b40b
commit bc0e2a3438
No known key found for this signature in database
GPG Key ID: D9A5748BACC6E3C2
3 changed files with 7 additions and 7 deletions

View File

@ -125,7 +125,7 @@ endfunction
" Update the statusline
function! airline#update_statusline()
if airline#util#stl_disabled()
if airline#util#stl_disabled(winnr())
return
endif
let range = filter(range(1, winnr('$')), 'v:val != winnr()')
@ -154,11 +154,11 @@ endfunction
" Function to draw inactive statuslines for inactive windows
function! airline#update_statusline_inactive(range)
if airline#util#stl_disabled()
if airline#util#stl_disabled(winnr())
return
endif
for nr in a:range
if airline#util#getwinvar(nr, 'airline_disabled', 0)
if airline#util#stl_disabled(nr)
continue
endif
call setwinvar(nr, 'airline_active', 0)

View File

@ -170,11 +170,11 @@ function! airline#util#themes(match)
return sort(map(files, 'fnamemodify(v:val, ":t:r")') + ['random'])
endfunction
function! airline#util#stl_disabled()
function! airline#util#stl_disabled(winnr)
" setting the statusline is disabled,
" either globally or per window
" w:airline_disabled is deprecated!
return get(g:, 'airline_disable_statusline', 0) ||
\ airline#util#getwinvar(winnr(), 'airline_disable_statusline', 0) ||
\ airline#util#getwinvar(winnr(), 'airline_disabled', 0)
\ airline#util#getwinvar(a:winnr, 'airline_disable_statusline', 0) ||
\ airline#util#getwinvar(a:winnr, 'airline_disabled', 0)
endfunction

View File

@ -181,7 +181,7 @@ function! s:airline_toggle()
endif
augroup END
if !airline#util#stl_disabled()
if !airline#util#stl_disabled(winnr())
if &laststatus < 2
set laststatus=2
endif