     if @currentlyUsingBlocks
       return @addEmptyLine @tree.stringify()
     else
-      @aceEditor.getValue()
+      @getAceValue()
+
+  Editor::getAceValue = ->
+    value = @aceEditor.getValue()
+    @lastAceSeenValue = value
+
+  Editor::setAceValue = (value) ->
+    if value isnt @lastAceSeenValue
+      console.log 'setting ace value'
+      @aceEditor.setValue value
+      @lastAceSeenValue = value
+
 
   # PUBLIC EVENT BINDING HOOKS
   # ===============================


      # Now we are done with the "clickedX" suite of stuff.
      @clickedPoint = @clickedBlock = null

      @begunTrash = @wouldDelete position


        for handler in editorBindings[event.type]
          handler.call this, event, state

      for eventName, elements of {
          keydown: [@meltElement, @paletteElement]
          keyup: [@meltElement, @paletteElement]
