DisplayBufferMarker::matchesAttributes -> ::matchesProperties

This commit is contained in:
Ben Ogle
2014-09-17 18:00:31 -07:00
parent cef8b95ef3
commit bf44cf89db
3 changed files with 7 additions and 4 deletions

View File

@@ -155,9 +155,12 @@ class DisplayBufferMarker
deprecate 'Use Marker::getProperties instead'
@setProperties(properties)
matchesAttributes: (attributes) ->
matchesProperties: (attributes) ->
attributes = @displayBuffer.translateToBufferMarkerParams(attributes)
@bufferMarker.matchesAttributes(attributes)
@bufferMarker.matchesParams(attributes)
matchesAttributes: (attributes) ->
deprecate 'Use Marker::matchesProperties instead'
@matchesProperties(attributes)
###
Section: Comparing to other markers

View File

@@ -1139,7 +1139,7 @@ class DisplayBuffer extends Model
@emitDidChange(event, false)
handleBufferMarkerCreated: (marker) =>
@createFoldForMarker(marker) if marker.matchesAttributes(@getFoldMarkerAttributes())
@createFoldForMarker(marker) if marker.matchesProperties(@getFoldMarkerAttributes())
if displayBufferMarker = @getMarker(marker.id)
# The marker might have been removed in some other handler called before
# this one. Only emit when the marker still exists.

View File

@@ -2622,7 +2622,7 @@ class Editor extends Model
@emitter.emit 'did-change-grammar'
handleMarkerCreated: (marker) =>
if marker.matchesAttributes(@getSelectionMarkerAttributes())
if marker.matchesProperties(@getSelectionMarkerAttributes())
@addSelection(marker)
###