Simplify marker events

Instead of marker-added and marker-removed events which are emitted
when markers are created/invalidated/revalidated/destroyed, we now
just have marker-created events that are triggered *only* when markers
are created for the first time. The marker itself emits a 'destroyed'
event when it is destroyed. The marker already notifies observers when
its validation status changes, so that's covered.
This commit is contained in:
Nathan Sobo
2013-04-29 19:06:14 -06:00
parent b2d34d93ab
commit 4ca00f7347
6 changed files with 24 additions and 45 deletions

View File

@@ -165,6 +165,7 @@ class BufferMarker
# Destroys the marker
destroy: ->
@buffer.destroyMarker(@id)
@trigger 'destroyed'
# Returns a {Boolean} indicating whether the marker is valid. Markers can be
# invalidated when a region surrounding them in the buffer is changed.