This repository was archived by the owner on Mar 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
IndexError when the candidate is bad #23
Copy link
Copy link
Open
Description
When using the Struct::function() syntax deoplete-rust throws the following error.
[deoplete] Traceback (most recent call last):
File "/home/aggoetey/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 220, in _gather_results
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/aggoetey/.local/share/nvim/plugged/deoplete-rust/rplugin/python3/deoplete/sources/rust.py", line 61, in gather_candidates
'kind': tokens[4],
IndexError: list index out of range
Error from rust: IndexError('list index out of range'). Use :messages / see above for error details.
Adding a simple check in the rust.py file to make sure that len(tokens) > 5 stops this crash from happening and makes it function as expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels