def trim(self):
        # XXX: Should this fire an event?
        row, column, buffer = self._row, self._column, self.window.buffer
        self._row = row = max(min(len(buffer) - 1, row), 0)
        self._column = max(min(len(buffer[row]) - 1, column), 0)
dataset/ETHPy150Open Julian/PyVi/pyvi/window.py/Cursor.trim/original