diff options
Diffstat (limited to 'rplugin')
-rw-r--r-- | rplugin/python3/deoplete/source/omni.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rplugin/python3/deoplete/source/omni.py b/rplugin/python3/deoplete/source/omni.py index 2eb84ac..077e469 100644 --- a/rplugin/python3/deoplete/source/omni.py +++ b/rplugin/python3/deoplete/source/omni.py @@ -44,6 +44,8 @@ class Source(Base): def _get_complete_position(self, context: UserContext, current_ft: str, filetype: str) -> int: + complete_pos = -1 + for omnifunc in convert2list( self.get_filetype_var(filetype, 'functions')): if omnifunc == '' and (filetype == current_ft or @@ -69,15 +71,16 @@ class Source(Base): 'rubycomplete#Complete', 'phpcomplete#CompletePHP']: # In the blacklist - return -1 + continue try: complete_pos = int(self.vim.call(self._omnifunc, 1, '')) except Exception: self.print_error('Error occurred calling omnifunction: ' + self._omnifunc) return -1 - return complete_pos - return -1 + if complete_pos >= 0: + break + return complete_pos def gather_candidates(self, context: UserContext) -> Candidates: try: |