   #   update the position of our cursor to the new one using a character
   #   @param character [Character] the new character
   updateCursorPosition : (obj) =>
-    if this.lock_editor_propagation
-      # break, if lock is on
-      return
-    this.lock_editor_propagation = true
-    if typeof obj == "number"
-      @selfCursor = (@_get "characters").ref(obj)
-    else
-      @selfCursor = obj
-    (@_get "cursors").val(@_model.HB.getUserId(), @selfCursor)
-    this.lock_editor_propagation = false
+    locker @, obj, (obj) =>
+      if typeof obj == "number"
+        @selfCursor = (@_get "characters").ref(obj)
+      else
+        @selfCursor = obj
+      (@_get "cursors").val(@_model.HB.getUserId(), @selfCursor)
 
   # describe how to propagate yjs events to the editor
   # TODO: should be private!
   bindEventsToEditor : (editor) ->
-    # update the editor when something on the $cursors happens
-    ###
-    @_get("cursors").observe (events)=>
-      if this.lock_editor_propagation
-        # break, if lock is on
-        return
-      this.lock_editor_propagation = true
-      for event in events
-        id = event.name
-        index = event.object.val(event.name).getPosition()
-        text = event.name
-        color = "grey" # FIXME
-
-        @editor.setCursor id, index, text, color
-      this.lock_editor_propagation = false
-    ###
-
     # update the editor when something on the $characters happens
-    @_get("characters").observe (events)=>
-      if this.lock_editor_propagation
-        # break, if lock is on
-        return
-      this.lock_editor_propagation = true
+    @_get("characters").observe (events) => locker @, events, (events) =>
       for event in events
         delta =
           ops: [{retain: event.position}]

BaseClass = (require "./misc.coffee").BaseClass
Editors = (require "./editors.coffee")
# All dependencies (like Y.Selections) to other types (that have its own
# repository) should  be included by the user (in order to reduce the amount of

  # @param editor [Editor] an editor instance
  # @param author [String] the name of the local author
  constructor: () ->
    # TODO: generate a UID (you can get a unique id by calling
    # `@_model.getUid()` - is this what you mean?)
    # @author = author
