Skip to content

Commit

Permalink
Merge pull request #4209 from bstaletic/popup_scrolling
Browse files Browse the repository at this point in the history
[READY] Handle scrolling when hover popup is open
  • Loading branch information
mergify[bot] committed Feb 14, 2024
2 parents 05bbb07 + cd48033 commit f078924
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions autoload/youcompleteme.vim
Expand Up @@ -717,6 +717,12 @@ function! s:EnableAutoHover()
augroup YcmBufHover
autocmd! * <buffer>
autocmd CursorHold <buffer> call s:Hover()
if exists( '##WinResized' )
autocmd WinResized <buffer> call popup_close( s:cursorhold_popup )
endif
if exists( '##WinScrolled' )
autocmd WinScrolled <buffer> call popup_close( s:cursorhold_popup )
endif
augroup END
endif
endfunction
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit f078924

Please sign in to comment.