def point2pos(self, point):
        """Converts a point or offset in a file to a (row, col) position."""
        row = self._vim.eval('byte2line({})'.format(point))
        col = self._vim.eval('{} - line2byte({})'.format(point, row))
        return (int(row), int(col))
def point2pos ( self , point ) : row = self . _vim . eval ( 'byte2line({})' . format ( point ) ) col = self . _vim . eval ( '{} - line2byte({})' . format ( point , row ) ) return ( int ( row ) , int ( col ) )
Converts a point or offset in a file to a (row, col) position.