Skip to content

Commit

Permalink
Stop auto hover timer if buffer changes or cursor moves
Browse files Browse the repository at this point in the history
  • Loading branch information
bstaletic committed Oct 6, 2023
1 parent cc9a3ae commit 9e44f32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions autoload/youcompleteme.vim
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ function! s:OnBufferEnter()
return
endif

if g:ycm_auto_hover ==# 'CursorHold' && s:enable_hover
call timer_stop( s:pollers.command.id )
endif

call s:SetUpCompleteopt()
call s:EnableCompletingInCurrentBuffer()

Expand Down Expand Up @@ -1594,6 +1598,7 @@ if exists( '*popup_atcursor' )
return
endif

call timer_stop( s:pollers.command.id )
if !has_key( b:, 'ycm_hover' )
let cmds = youcompleteme#GetDefinedSubcommands()
if index( cmds, 'GetHover' ) >= 0
Expand Down

0 comments on commit 9e44f32

Please sign in to comment.