summaryrefslogtreecommitdiff
path: root/rplugin
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2020-10-05 09:11:11 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2020-10-05 09:11:11 +0900
commit7c781f4a887719e1785b3f0c4d8087d99d201e06 (patch)
tree0eb20b3f4595babebfd74773c7db1de294d3c772 /rplugin
parent24976e91e820ccd2476ff0f9686033e83d18fac6 (diff)
downloaddeoplete.nvim-7c781f4a887719e1785b3f0c4d8087d99d201e06.zip
Fix #1132 omnifunc check
Diffstat (limited to 'rplugin')
-rw-r--r--rplugin/python3/deoplete/source/omni.py9
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: