From c3984505db5d9f59bc829f84aaa8e276522cb52a Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Tue, 27 Jun 2017 22:40:11 +0100 Subject: [PATCH] Use the omnifunc-supplied start column --- python/ycm/omni_completer.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/ycm/omni_completer.py b/python/ycm/omni_completer.py index 1ea274b5..17872832 100644 --- a/python/ycm/omni_completer.py +++ b/python/ycm/omni_completer.py @@ -83,6 +83,13 @@ class OmniCompleter( Completer ): # 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' ] ),