     console.error error
     newOutputCell.html displayPretty(error) + "<br>See console for details."
     newOutputCell.addClass "error"
+  insertCellCursorAfter newOutputCell
+  inputCell.editor.getInputField().blur()
 
 findOrCreateCellCursor = () ->
   cursor = $("#cursor")

$(document).bind 'keydown', 'up', (ev) -> moveCellCursorUp()
$(document).bind 'keydown', 'right', (ev) -> moveCellCursorRight()
$(document).bind 'keydown', 'left', (ev) -> moveCellCursorLeft()

    mode: "coffeescript"
  inputCell.editor = editor
  addKeyMap editor, inputCell
  editor


for i in [1, 2, 3]
