 class DisplayBufferMarker
   observers: null
   bufferMarkerSubscription: null
-  previousHeadScreenPosition: null
-  previousTailScreenPosition: null
+  headScreenPosition: null
+  tailScreenPosition: null
 
   constructor: ({@id, @displayBuffer}) ->
     @buffer = @displayBuffer.buffer

    @buffer.setMarkerRange(@id, bufferRange, options)

  getHeadScreenPosition: ->
    @displayBuffer.screenPositionForBufferPosition(@getHeadBufferPosition(), wrapAtSoftNewlines: true)

  setHeadScreenPosition: (screenPosition, options) ->
    screenPosition = @displayBuffer.clipScreenPosition(screenPosition, options)

    delete @displayBuffer.markers[@id]

  notifyObservers: ({oldHeadBufferPosition, oldTailBufferPosition, bufferChanged}) ->
    oldHeadScreenPosition = @getHeadScreenPosition()
    @headScreenPosition = null
    newHeadScreenPosition = @getHeadScreenPosition()

    oldTailScreenPosition = @getTailScreenPosition()
    @tailScreenPosition = null
    newTailScreenPosition = @getTailScreenPosition()

    return if _.isEqual(newHeadScreenPosition, oldHeadScreenPosition) and _.isEqual(newTailScreenPosition, oldTailScreenPosition)

