Return added buffer from Project::addBufferAtIndex

This commit is contained in:
Kevin Sawicki
2013-11-12 18:45:08 -08:00
parent 276e63611a
commit 11787e5a5d

View File

@@ -233,8 +233,9 @@ class Project extends Model
# Private:
addBufferAtIndex: (buffer, index, options={}) ->
@buffers.insert(index, buffer)
buffer = @buffers.insert(index, buffer)
@emit 'buffer-created', buffer
buffer
# Private: Removes a {TextBuffer} association from the project.
#