mirror of
https://github.com/atom/atom.git
synced 2026-02-05 20:25:04 -05:00
Add DisplayBuffer.findMarker[s]
This commit is contained in:
@@ -673,6 +673,16 @@ class DisplayBuffer
|
||||
observeMarker: (id, callback) ->
|
||||
@getMarker(id).observe(callback)
|
||||
|
||||
findMarker: (attributes) ->
|
||||
@findMarkers(attributes)[0]
|
||||
|
||||
findMarkers: (attributes) ->
|
||||
{ startBufferRow, endBufferRow } = attributes
|
||||
attributes.startRow = startBufferRow if startBufferRow?
|
||||
attributes.endRow = endBufferRow if endBufferRow?
|
||||
attributes = _.omit(attributes, ['startBufferRow', 'endBufferRow'])
|
||||
@buffer.findMarkers(attributes)
|
||||
|
||||
###
|
||||
# Internal #
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user