diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index fa85ed614..0e137506e 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -717,6 +717,12 @@ function! s:EnableAutoHover() augroup YcmBufHover autocmd! * autocmd CursorHold call s:Hover() + if exists( '##WinResized' ) + autocmd WinResized call popup_close( s:cursorhold_popup ) + endif + if exists( '##WinScrolled' ) + autocmd WinScrolled call popup_close( s:cursorhold_popup ) + endif augroup END endif endfunction @@ -1646,10 +1652,12 @@ if exists( '*popup_atcursor' ) return endif - call s:GetCommandResponseAsyncImpl( - \ function( 's:ShowHoverResult' ), - \ 'autohover', - \ b:ycm_hover.command ) + if empty( popup_getpos( s:cursorhold_popup ) ) + call s:GetCommandResponseAsyncImpl( + \ function( 's:ShowHoverResult' ), + \ 'autohover', + \ b:ycm_hover.command ) + endif endfunction