     @_model.val key
   delete: (key) ->
     @_model.delete key
+
+  setCursor: () ->
+    if @editor.getSelection()
+      position = @characters.val @editor.getSelection().start
+    else
+      position = @characters.val 0
+
+    selfCursor =
+      author: @author
+      position: position
+      color: "grey" # FIXME
+    (@get "cursors").insert 0, selfCursor
 
   toQuill: (events) ->
     for event in events

    @author = author

    @editor = editor
    # shouldn't go there
    @editor.cursors = @editor.getModule("multi-cursor")

  _getModel: (Y, Operation) ->

      sels = @selections._getModel(Y, Operation)
      chars = @characters._getModel(Y, Operation)
      cursors = new Operation.ListManager(@).execute()

      @_model = new Operation.MapManager(@).execute()
      @_model.val "selections", sels
      @_model.val "characters", chars
      @_model.val "cursors", cursors

      @setCursor()

    return @_model

  _setModel: (model) ->
    @_model = model
    # check that our cursor isn't in the cursor list
    if _.all (@get "cursors").val(), (cursor -> cursor.author != @author)
      @setCursor()

  set: (key, val) ->
    @_model.val key, val
