Massive updates

This commit is contained in:
Garen Torikian
2013-04-11 21:11:12 -05:00
parent bb8f5bb40c
commit 7e5b6bf5c4
14 changed files with 50 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ class Buffer
invalidMarkers: null
refcount: 0
# Internal:
@deserialize: ({path, text}) ->
project.bufferForPath(path, text)
@@ -58,6 +59,7 @@ class Buffer
@undoManager = new UndoManager(this)
# Internal:
destroy: ->
throw new Error("Destroying buffer twice with path '#{@getPath()}'") if @destroyed
@file?.off()
@@ -73,6 +75,7 @@ class Buffer
@destroy() if @refcount <= 0
this
# Internal:
serialize: ->
deserializer: 'TextBuffer'
path: @getPath()