mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Guard against a null pending changed event
Previously TextBuffer would emit change events even when the change was empty. SharedString does not emit empty change events and so a pending event may no longer be present when a marker-updated event fires.
This commit is contained in:
committed by
Kevin Sawicki
parent
2ff282011b
commit
e01ac96b66
@@ -605,9 +605,9 @@ class DisplayBuffer
|
||||
@maxLineLength = length
|
||||
|
||||
handleMarkersUpdated: =>
|
||||
event = @pendingChangeEvent
|
||||
@pendingChangeEvent = null
|
||||
@triggerChanged(event, false)
|
||||
if event = @pendingChangeEvent
|
||||
@pendingChangeEvent = null
|
||||
@triggerChanged(event, false)
|
||||
|
||||
handleMarkerCreated: (marker) =>
|
||||
new Fold(this, marker) if marker.matchesAttributes(@foldMarkerAttributes())
|
||||
|
||||
Reference in New Issue
Block a user