                     uuid = misc.uuid()
                     cm.replaceRange(uuid, {line:line, ch:1}, {line:line, ch:37})
                 context.uuids[uuid] = true
-
                 if marks.length == 1 and (marks[0].type != 'output' or marks[0].uuid != uuid)
                     marks[0].clear()
                     marks = []


class SynchronizedWorksheet extends SynchronizedDocument2
    constructor: (@editor, @opts) ->
        #window.w = @

        # these two lines are assumed, at least by the history browser
        @codemirror  = @editor.codemirror

                        output.dblclick () =>
                            # Double click output to toggle input
                            @action(pos:{line:mark.find().from.line-1, ch:0}, toggle_input:true)

                cm.addLineClass(line, 'gutter', 'sagews-output-cm-gutter')
                cm.addLineClass(line, 'text',   'sagews-output-cm-text')
                cm.addLineClass(line, 'wrap',   'sagews-output-cm-wrap')

                # To be sure, definitely properly set output state (should already be properly set when rendering input)
                if context.hide_output
                    for t in ['gutter', 'text']
                        cm.addLineClass(line, t, 'hidden')
                else
                    for t in ['gutter', 'text']
                        cm.removeLineClass(line, t, 'hidden')

                @render_output(marks[0], x.slice(38), line)

            else
