Skip to content

Commit

Permalink
Call s:UpdateCursorMoved() in Complete funcs
Browse files Browse the repository at this point in the history
This is required to properly handle the pum after manually invoking the
completion and using e.g. <C-w> to delete the word; this won't trigger
CursorMovedI.

Ref: ycm-core#1282 (comment)
  • Loading branch information
blueyed committed Feb 4, 2015
1 parent 5c4a246 commit c21edd9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autoload/youcompleteme.vim
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ function! youcompleteme#Complete( findstart, base )
if !pyeval( 'ycm_state.IsServerAlive()' )
return -2
endif
call s:UpdateCursorMoved()
py ycm_state.CreateCompletionRequest()
return pyeval( 'base.CompletionStartColumn()' )
else
Expand All @@ -729,6 +730,7 @@ function! youcompleteme#OmniComplete( findstart, base )
return -2
endif
let s:omnifunc_mode = 1
call s:UpdateCursorMoved()
py ycm_state.CreateCompletionRequest( force_semantic = True )
return pyeval( 'base.CompletionStartColumn()' )
else
Expand Down

0 comments on commit c21edd9

Please sign in to comment.