     else
       CodeMirror.Pass
   'Shift-Up': (cm) ->
-    previous_context = context_at_offset cm.lead_cell, -1
+    previous_context = input_cell_at_offset cm.lead_cell, -1
     if previous_context?
       cm.setValue previous_context.editor.getValue()
       cm.setCursor(line: cm.lineCount() - 1)

    set_code: add_context
    run: run_in_available_context
    clear_output: -> clear_contexts()
    previously_run: -> context_at_offset(input_cell, -1).editor.getValue()
    hide_input: -> remove_cell input_cell
    value: (value) -> _lead_cli_value: value
    async: (fn) ->

  Up: (cm) ->
    cur = cm.getCursor()
    if cur.line is 0
      previous_context = input_cell_at_offset cm.lead_cell, -1
      if previous_context?
        previous_context.editor.focus()
      else
