forked from VimPlug/jedi
goto before assignments should still work, 305
This commit is contained in:
@@ -441,8 +441,9 @@ class Script(object):
|
|||||||
definitions = follow_inexistent_imports(defs)
|
definitions = follow_inexistent_imports(defs)
|
||||||
if isinstance(user_stmt, pr.Statement):
|
if isinstance(user_stmt, pr.Statement):
|
||||||
c = user_stmt.get_commands()
|
c = user_stmt.get_commands()
|
||||||
if c and not isinstance(c[0], (str, unicode)) and \
|
if c and not isinstance(c[0], (str, unicode)) \
|
||||||
c[0].start_pos > self._pos:
|
and c[0].start_pos > self._pos \
|
||||||
|
and not re.search(r'\.\w+$', goto_path):
|
||||||
# The cursor must be after the start, otherwise the
|
# The cursor must be after the start, otherwise the
|
||||||
# statement is just an assignee.
|
# statement is just an assignee.
|
||||||
definitions = [user_stmt]
|
definitions = [user_stmt]
|
||||||
|
|||||||
@@ -78,9 +78,9 @@ c()
|
|||||||
|
|
||||||
class BeforeAssignment():
|
class BeforeAssignment():
|
||||||
x = 3
|
x = 3
|
||||||
def __init__(self):
|
|
||||||
#! 13 ['x = 3']
|
#! 18 ['x = 3']
|
||||||
self.x = ''
|
BeforeAssignment.x = ''
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# imports
|
# imports
|
||||||
|
|||||||
Reference in New Issue
Block a user