mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Return added buffer from Project::addBufferAtIndex
This commit is contained in:
@@ -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.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user