def grow(self, window, util, direction):
        if window.num_groups() == 1:
            return

        # Prepare the layout
        layout = window.layout()
        lm = ll.LayoutManager(layout)
        rows = lm.rows()
        cols = lm.cols()
        cells = layout['cells']

        # calculate the width and height in pixels of all the views
        width = height = dx = dy = 0

        for g,cell in enumerate(cells):
            view = window.active_view_in_group(g)
            w,h = view.viewport_extent()
            width += w
            height += h
            dx += cols[cell[2]] - cols[cell[0]]
            dy += rows[cell[3]] - rows[cell[1]]
        width /= dx
        height /= dy

        current = window.active_group()
        view = util.view

        # Handle vertical moves
        count = util.get_count()
        if direction in ('g', 's'):
            unit = view.line_height() / height
        else:
            unit = view.em_width() / width

        window.set_layout(lm.extend(current, direction, unit, count))

        # make sure point doesn't disappear in any active view - a delay is needed for this to work
        def ensure_visible():
            for g in range(window.num_groups()):
                view = window.active_view_in_group(g)
                util = CmdUtil(view)
                util.ensure_visible(util.get_point())
        sublime.set_timeout(ensure_visible, 50)

    #
    # Split the current pane in half. Clone the current view into the new pane. Refuses to split if
    # the resulting windows would be too small.
dataset/ETHPy150Open grundprinzip/sublemacspro/jove.py/SbpPaneCmdCommand.grow/original