plugin: do not trigger redraws for popup windows
coc.nvim might set the filetype of the poppup window, which might trigger a redraw of the statusline, causing the current window to become inactive. So bail out early, if the current buffer is a popup buffer. It cannot have a statusline anyhow. fixes #1930 (but this time for Vim)
This commit is contained in:
parent
b9eb941201
commit
19c655b420
|
@ -46,16 +46,16 @@ endfunction
|
||||||
|
|
||||||
let s:active_winnr = -1
|
let s:active_winnr = -1
|
||||||
function! s:on_window_changed(event)
|
function! s:on_window_changed(event)
|
||||||
let s:active_winnr = winnr()
|
" don't trigger for Vim popup windows
|
||||||
|
if &buftype is# 'popup'
|
||||||
if pumvisible() && (!&previewwindow || g:airline_exclude_preview)
|
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
" work around a neovim bug: do not trigger on floating windows
|
|
||||||
" Disabled, Bug is fixed in Neovim, TODO: should be removed soon
|
if pumvisible() && (!&previewwindow || g:airline_exclude_preview)
|
||||||
" if exists("*nvim_win_get_config") && !empty(nvim_win_get_config(0).relative)
|
" do not trigger for previewwindows
|
||||||
" return
|
return
|
||||||
" endif
|
endif
|
||||||
|
let s:active_winnr = winnr()
|
||||||
" Handle each window only once, since we might come here several times for
|
" Handle each window only once, since we might come here several times for
|
||||||
" different autocommands.
|
" different autocommands.
|
||||||
let l:key = [bufnr('%'), s:active_winnr, winnr('$'), tabpagenr(), &ft]
|
let l:key = [bufnr('%'), s:active_winnr, winnr('$'), tabpagenr(), &ft]
|
||||||
|
|
Loading…
Reference in New Issue