mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Make TokenizedBuffer a telepath.Model subclass
There's a bunch of improvised code to make this work right now because of the circularity of this refactoring. It will stabilize over time.
This commit is contained in:
@@ -81,12 +81,12 @@ class TextBuffer extends telepath.Model
|
||||
@emit 'changed', bufferChangeEvent
|
||||
@scheduleModifiedEvents()
|
||||
|
||||
destroy: ->
|
||||
unless @destroyed
|
||||
destroyed: ->
|
||||
unless @alreadyDestroyed
|
||||
@cancelStoppedChangingTimeout()
|
||||
@file?.off()
|
||||
@unsubscribe()
|
||||
@destroyed = true
|
||||
@alreadyDestroyed = true
|
||||
@emit 'destroyed', this
|
||||
|
||||
isRetained: -> @refcount > 0
|
||||
|
||||
Reference in New Issue
Block a user