1
0
forked from VimPlug/jedi

Fix an issue with the positions of InstanceNames that used the original position_modifier.

This commit is contained in:
Dave Halter
2015-02-02 02:29:39 +01:00
parent c58cdbbf9b
commit a4bd412801
2 changed files with 2 additions and 4 deletions

View File

@@ -260,7 +260,7 @@ class LazyInstanceDict(object):
class InstanceName(pr.Name): class InstanceName(pr.Name):
def __init__(self, origin_name, parent): 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.value,
origin_name.start_pos) origin_name.start_pos)
self._origin_name = origin_name self._origin_name = origin_name

View File

@@ -158,9 +158,7 @@ class Leaf(Base):
@start_pos.setter @start_pos.setter
def start_pos(self, value): def start_pos(self, value):
# TODO I think this is wrong, because the position_modifier.line needs self._start_pos = value[0] - self.position_modifier.line, value[1]
# to be looked at as well. Probably it needs to be substracted.
self._start_pos = value
@property @property
def end_pos(self): def end_pos(self):