diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 8205d83eb9..dcf7e8655f 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 @@ -1621,9 +1627,11 @@ if exists( '*popup_atcursor' ) return endif - call youcompleteme#GetCommandResponseAsync( - \ function( 's:ShowHoverResult' ), - \ b:ycm_hover.command ) + if empty( popup_getpos( s:cursorhold_popup ) ) + call youcompleteme#GetCommandResponseAsync( + \ function( 's:ShowHoverResult' ), + \ b:ycm_hover.command ) + endif endfunction