Listen for destroyed events on deserialized buffers

This commit is contained in:
Kevin Sawicki
2013-11-19 09:08:24 -08:00
parent 7e0af4c575
commit ee1ec4670d
2 changed files with 13 additions and 0 deletions

View File

@@ -33,6 +33,9 @@ class Project extends telepath.Model
# Private: Called by telepath.
attached: ->
for buffer in @buffers.getValues()
buffer.once 'destroyed', => @removeBuffer(buffer)
@openers = []
@editSessions = []
@setPath(@path)