1
0
forked from VimPlug/jedi

Temporarily disable on import completion. Not sure if we're going to do it with the normal parser.

This commit is contained in:
Dave Halter
2014-11-19 13:24:45 +01:00
parent c71646a9a0
commit bb9d6b4832
4 changed files with 12 additions and 5 deletions

View File

@@ -414,13 +414,13 @@ class Simple(Base):
def get_code(self):
return "".join(c.get_code() for c in self.children)
def leaf_for_position(self, position):
def name_for_position(self, position):
for c in self.children:
if isinstance(c, Leaf):
if c.start_pos <= position < c.end_pos:
if c.start_pos <= position <= c.end_pos:
return c
else:
result = c.leaf_for_position(position)
result = c.name_for_position(position)
if result is not None:
return result
return None