1
0
forked from VimPlug/jedi

possible to return dynamic arrays

This commit is contained in:
David Halter
2012-08-22 11:44:45 +02:00
parent 9c09de6245
commit d85184d387
5 changed files with 142 additions and 8 deletions

View File

@@ -202,7 +202,13 @@ class Scope(Simple):
@Python3Method
def get_statement_for_position(self, pos):
for s in self.statements:
if s.start_pos <= pos < self.end_pos:
if isinstance(s, Flow):
p = s.get_statement_for_position(pos)
if s.next and not p:
p = s.next.get_statement_for_position(pos)
if p:
return p
elif s.start_pos <= pos < s.end_pos:
return s
for s in self.subscopes: