                             onMatchFinderChoose={@onMatchFinderChoose}
                             onMatchFinderClose={@closeMatchFinder}
                             renumber={@renumber}
+                            width={@state.puzzle.width}
+                            height={@state.puzzle.height}
+                            onSetDimensions={@onSetDimensions}
                             needToRenumber={@needToRenumber()}
                             toggleMaintainRotationalSymmetry={@toggleMaintainRotationalSymmetry}
                             maintainRotationalSymmetry={@state.maintainRotationalSymmetry}

                op = Ot.compose(@state.puzzle, op, Ot.opEditCellValue row, col, "contents", "")
                op = Ot.compose(@state.puzzle, op, Ot.opEditCellValue row, col, "number", null)
                op = Ot.compose(@state.puzzle, op, Ot.opEditCellValue row, col, "open", true)
        console.log(op)
        @props.requestOp op

    # Perform an automatic renumbering.


        @closeMatchFinder()

    # setting dimensions
    onSetDimensions: (width, height) ->
        # NOTE: this actually has one pretty annoying consequence: if the dimensions
        # are, say, 15x15 and two users set them to 20x20 at the same time, each user
        # will add 5 rows and 5 cols, so the dimension will end up at 25x25 when they
        # probably just wanted 20x20. I guess this is a symptom of the row/col OT
        # being overly sophisticated? Well, we could fix this at the OT layer. (TODO)

        op = Ot.identity(@state.puzzle)

        if width < @width()
            op = Ot.compose(@state.puzzle, op,
                    Ot.opDeleteCols(@state.puzzle, width, @width() - width))
        else if width > @width()
            op = Ot.compose(@state.puzzle, op,
                    Ot.opInsertCols(@state.puzzle, @width(), width - @width()))

        if height < @height()
            op = Ot.compose(@state.puzzle, op,
                    Ot.opDeleteRows(@state.puzzle, height, @height() - height))
        else if height > @height()
            op = Ot.compose(@state.puzzle, op,
                    Ot.opInsertRows(@state.puzzle, @height(), height - @height()))

        @props.requestOp op

    # Copy/cut/paste stuff

    doCopy: (event) ->
