mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
DisplayBufferMarker::matchesAttributes -> ::matchesProperties
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user