Skip to content

Commit

Permalink
Use the omnifunc-supplied start column
Browse files Browse the repository at this point in the history
  • Loading branch information
puremourning committed Jun 29, 2017
1 parent b564b5d commit c398450
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/ycm/omni_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ def ComputeCandidatesInner( self, request_data ):
# FIXME: Technically, if the return is -1 we should raise an error
return []

# Use the start column calculated by the omnifunc, rather than our own
# interpretation. This is important for certain languages where our
# identifier detection is either incorrect or not compatible with the
# behaviour of the omnifunc. Note: do this before calling the omnifunc
# because it affects the value returned by 'query'
request_data[ 'start_column' ] = return_value + 1

omnifunc_call = [ self._omnifunc,
"(0,'",
vimsupport.EscapeForVim( request_data[ 'query' ] ),
Expand Down

0 comments on commit c398450

Please sign in to comment.