 
       @currentlyUsingBlocks = true
       @currentlyAnimating = true
+      @fireEvent 'statechange', [true]
 
       setTimeout (=>
         # Hide scrollbars and increase width

    @aceEditor.getSession().setTabSize 2

    @aceEditor.on 'change', =>
      if @currentlyUsingBlocks and not @suppressAceChangeEvent
        @copyAceEditor()

    @currentlyUsingBlocks = true
    @currentlyAnimating = false

  # ================================

  Editor::copyAceEditor = ->
    clearTimeout @changeFromAceTimer
    @changeFromAceTimer = null
    @gutter.style.width = @aceEditor.renderer.$gutterLayer.gutterWidth + 'px'
    @resizeBlockMode()
    return @setValue_raw @aceEditor.getValue()

  Editor::changeFromAceEditor = ->
    if @changeFromAceTimer then return
    @changeFromAceTimer = setTimeout (=>
      @copyAceEditor()
    ), 0

  hook 'populate', 0, ->
    @aceElement = document.createElement 'div'
