       @tree.perform(operation, 'backward', [@cursor]) unless operation is 'CAPTURE'
 
   @popUndo()
+  @correctCursor()
   @redrawMain()
   return
 

    return

  @setCursor block.start, null, 'before'
  @spliceOut block
  @redrawMain()



# Now we hook to ctrl-z to undo.
hook 'keydown', 0, (event, state) ->
  if event.which is Z_KEY and event.shiftKey and command_pressed(event)
    @redo()
  else if event.which is Z_KEY and command_pressed(event)
    @undo()
  else if event.which is Y_KEY and command_pressed(event)
    @redo()
