     oldDelta = @editor.getDelta()
     @ignoringChanges = false
     @editor.on(Scribe.Editor.events.USER_TEXT_CHANGE, (delta) =>
-      return if @ignoringChanges
-      this.record(delta, oldDelta)
+      this.record(delta, oldDelta) unless @ignoringChanges
       oldDelta = @editor.getDelta()
     )
 

        index = getLastChangeIndex(change.undo)
        @editor.setSelection(new Scribe.Range(@editor, index, index))
      )
      @redoStack.push(change.undo)


module.exports = Scribe

        index = getLastChangeIndex(change.redo)
        @editor.setSelection(new Scribe.Range(@editor, index, index))
      )
      @undoStack.push(change)

  undo: ->
    if @undoStack.length > 0
