   #
   # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.
   onDidChange: (callback) ->
+    unless @hasChangeObservers
+      @previousEventState = @getSnapshot(@getRange())
+      @hasChangeObservers = true
     @emitter.on 'did-change', callback
 
   # Public: Returns the current {Range} of the marker. The range is immutable.

    else
      newHeadPosition = newState.range.end
      newTailPosition = newState.range.start

    @store.markerUpdated(@id) unless textChanged

    @emitter.emit("did-change", {
      wasValid: oldState.valid, isValid: newState.valid

    @invalidate ?= 'overlap'
    @persistent ?= true
    @properties ?= {}
    @hasChangeObservers = false
    @rangeWhenDestroyed = null
    Object.freeze(@properties)
    @store.setMarkerHasTail(@id, @tailed)

  ###
  Section: Event Subscription
