forked from VimPlug/jedi
Fix an issue with the positions of InstanceNames that used the original position_modifier.
This commit is contained in:
@@ -260,7 +260,7 @@ class LazyInstanceDict(object):
|
||||
|
||||
class InstanceName(pr.Name):
|
||||
def __init__(self, origin_name, parent):
|
||||
super(InstanceName, self).__init__(origin_name.position_modifier,
|
||||
super(InstanceName, self).__init__(pr.zero_position_modifier,
|
||||
origin_name.value,
|
||||
origin_name.start_pos)
|
||||
self._origin_name = origin_name
|
||||
|
||||
@@ -158,9 +158,7 @@ class Leaf(Base):
|
||||
|
||||
@start_pos.setter
|
||||
def start_pos(self, value):
|
||||
# TODO I think this is wrong, because the position_modifier.line needs
|
||||
# to be looked at as well. Probably it needs to be substracted.
|
||||
self._start_pos = value
|
||||
self._start_pos = value[0] - self.position_modifier.line, value[1]
|
||||
|
||||
@property
|
||||
def end_pos(self):
|
||||
|
||||
Reference in New Issue
Block a user