mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 14:49:06 +08:00
fix missing check for w:airline_disable_statusline
This commit is contained in:
parent
b93492b40b
commit
bc0e2a3438
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user