       changed = true
 
     unless newRange.isEqual(oldRange)
-      @manager.setMarkerRange(@id, newRange)
+      @store.setMarkerRange(@id, newRange)
     unless @tailed is wasTailed
-      @manager.setMarkerHasTail(@id, @tailed)
+      @store.setMarkerHasTail(@id, @tailed)
     @emitChangeEvent(newRange, textChanged, propertiesChanged)
     changed
 


module.exports =
class Marker
  constructor: (@id, @manager, range, @properties) ->
    @emitter = new Emitter
    @valid = true


  hasTail: -> @tailed

  destroy: ->
    @store.destroyMarker(@id)
    @emitter.emit("did-destroy")

  copy: (options) ->
    properties = clone(@properties)
    properties[key] = value for key, value of options
    @store.markRange(@getRange(), options)

  ###
  Section: Event Subscription
