   # ANIMATION AND ACE EDITOR SUPPORT
   # ================================
 
+  Editor::copyAceEditor = ->
+    @setFontSize_raw @aceEditor.getFontSize()
+    @gutter.style.width = @aceEditor.renderer.$gutterLayer.gutterWidth + 'px'
+    @resize()
+
   hook 'populate', 0, ->
     @aceElement = document.createElement 'div'
     @aceElement.className = 'ice-ace'


  Editor::performFreezeAnimation = (fadeTime = 500, translateTime = 500, cb = ->)->
    if not @currentlyUsingBlocks and not @currentlyAnimating
      @fireEvent 'statechange', [true]
      setValueResult = @setValue_raw @aceEditor.getValue()

      unless setValueResult.success

      # anything non-local, only redraw locally.
      if deepEquals newp, oldp
        rect = new draw.NoRectangle()

        rect.unite treeView.bounds[line - 1] if line > 0
        rect.unite treeView.bounds[line]
        rect.unite treeView.bounds[line + 1] if line + 1 < treeView.bounds.length

        rect.width = Math.max rect.width, @mainCanvas.width


        @redrawMain
          boundingRectangle: rect
