Use the omnifunc-supplied start column

This commit is contained in:
Ben Jackson 2017-06-27 22:40:11 +01:00
parent b564b5d8e3
commit c3984505db

View File

@ -83,6 +83,13 @@ class OmniCompleter( Completer ):
# FIXME: Technically, if the return is -1 we should raise an error # FIXME: Technically, if the return is -1 we should raise an error
return [] 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, omnifunc_call = [ self._omnifunc,
"(0,'", "(0,'",
vimsupport.EscapeForVim( request_data[ 'query' ] ), vimsupport.EscapeForVim( request_data[ 'query' ] ),