main: ignore popup windows for inactive windows

When openning popup (vim) or floating (neovim) windows,
do not consider those windows for disabled windows. That is, leave the
main window in activate state instead of marking it disabled

closes: #2387
This commit is contained in:
Gauravsingh Sisodia
2021-12-04 01:24:26 +05:30
committed by Christian Brabandt
parent de73a21903
commit 8e36c0a8ed
2 changed files with 11 additions and 1 deletions

View File

@@ -142,9 +142,10 @@ endfunction
" Update the statusline
function! airline#update_statusline()
if airline#util#stl_disabled(winnr())
if airline#util#stl_disabled(winnr()) || airline#util#is_popup_window(winnr())
return
endif
" TODO: need to ignore popup windows here as well?
let range = filter(range(1, winnr('$')), 'v:val != winnr()')
" create inactive statusline
call airline#update_statusline_inactive(range)