1
0
forked from VimPlug/jedi

Fix an issue with executed python objects.

This commit is contained in:
Dave Halter
2016-12-17 14:08:49 +01:00
parent e0b3ec1829
commit ce0a02f6c1
3 changed files with 7 additions and 4 deletions

View File

@@ -20,8 +20,8 @@ def sorted_definitions(defs):
return sorted(defs, key=lambda x: (x.module_path or '', x.line or 0, x.column or 0))
def get_on_completion_name(module, lines, position):
leaf = module.get_leaf_for_position(position)
def get_on_completion_name(module_node, lines, position):
leaf = module_node.get_leaf_for_position(position)
if leaf is None or leaf.type in ('string', 'error_leaf'):
# Completions inside strings are a bit special, we need to parse the
# string. The same is true for comments and error_leafs.