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 7, 2023
1 parent cc9a3ae commit 030c10e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions autoload/youcompleteme.vim
Expand Up @@ -766,6 +766,10 @@ function! s:OnBufferEnter()
return
endif

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

Check warning on line 770 in autoload/youcompleteme.vim

View check run for this annotation

Codecov / codecov/patch

autoload/youcompleteme.vim#L769-L770

Added lines #L769 - L770 were not covered by tests
endif

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

Expand Down Expand Up @@ -966,6 +970,10 @@ function! s:OnCursorMovedNormalMode()
return
endif

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

py3 ycm_state.OnCursorMoved()
endfunction

Expand Down

0 comments on commit 030c10e

Please sign in to comment.