From bc0e2a3438664a566a1c458f1e603283b61cf946 Mon Sep 17 00:00:00 2001 From: midchildan Date: Sun, 22 Dec 2019 20:06:35 +0900 Subject: [PATCH] fix missing check for w:airline_disable_statusline --- autoload/airline.vim | 6 +++--- autoload/airline/util.vim | 6 +++--- plugin/airline.vim | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 4b950df4..7ad7d51d 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -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) diff --git a/autoload/airline/util.vim b/autoload/airline/util.vim index c2a7ee15..0d9031d2 100644 --- a/autoload/airline/util.vim +++ b/autoload/airline/util.vim @@ -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 diff --git a/plugin/airline.vim b/plugin/airline.vim index 8e948cb6..a78f54c4 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -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