     @updateAllScreenLines()
     @tokenizedBuffer.on 'grammar-changed', (grammar) => @trigger 'grammar-changed', grammar
     @tokenizedBuffer.on 'changed', @handleTokenizedBufferChange
-    @subscribe @buffer, 'markers-updated', @handleMarkersUpdated
-    @subscribe @buffer, 'marker-created', @handleMarkerCreated
+    @subscribe @buffer, 'markers-updated', @handleBufferMarkersUpdated
+    @subscribe @buffer, 'marker-created', @handleBufferMarkerCreated
 
   serialize: -> @state.clone()
   getState: -> @state

        @longestScreenRow = maxLengthCandidatesStartRow + screenRow
        @maxLineLength = length

  handleMarkersUpdated: =>
    if event = @pendingChangeEvent
      @pendingChangeEvent = null
      @triggerChanged(event, false)

  handleMarkerCreated: (marker) =>
    new Fold(this, marker) if marker.matchesAttributes(@foldMarkerAttributes())
    @trigger 'marker-created', @getMarker(marker.id)

  foldForMarker: (marker) ->
    @foldsByMarkerId[marker.id]

  createFold: (startRow, endRow) ->
    foldMarker =
      @findFoldMarker({startRow, endRow}) ?
        @buffer.markRange([[startRow, 0], [endRow, Infinity]], @getFoldMarkerAttributes())
    @foldForMarker(foldMarker)

  isFoldedAtBufferRow: (bufferRow) ->
