diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index b43df82a39..a0e33510a3 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -717,6 +717,7 @@ function! s:EnableAutoHover() augroup YcmBufHover autocmd! * autocmd CursorHold call s:Hover() + autocmd WinScrolled call popup_close( s:cursorhold_popup ) augroup END endif endfunction @@ -1621,9 +1622,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