 
     oldScrollTop = @aceEditor.session.getScrollTop()
 
-    console.log 'SET ACE @setValue'
     @aceEditor.setValue value, -1
     @aceEditor.resize true
 


  Editor::performFreezeAnimation = (fadeTime = 500, translateTime = 500, cb = ->)->
    if not @currentlyUsingBlocks and not @currentlyAnimating
      @copyAceEditor()

      @fireEvent 'statechange', [true]

      setValueResult = @setValue_raw @aceEditor.getValue()

      unless setValueResult.success
        return setValueResult

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

  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'
