@curs_xy.setter
def curs_xy(self, xy):
    'Update max line lengths when we update cursor position.'
    (x, y) = xy
    if (y > (len(self.line_lengths) - 1)):
        self.line_lengths += [0 for i in range(((y - len(self.line_lengths)) + 1))]
    if (x > self.line_lengths[y]):
        self.line_lengths[y] = x
    self._curs_xy = xy
Update max line lengths when we update cursor position.
@curs_xy.setter
def curs_xy(self, xy):
    
    (x, y) = xy
    if (y > (len(self.line_lengths) - 1)):
        self.line_lengths += [0 for i in range(((y - len(self.line_lengths)) + 1))]
    if (x > self.line_lengths[y]):
        self.line_lengths[y] = x
    self._curs_xy = xy