mirror of
https://github.com/atom/atom.git
synced 2026-02-16 17:45:24 -05:00
Inline unnecessary addBufferAtIndex method
This commit is contained in:
@@ -646,11 +646,7 @@ class Project extends Model {
|
||||
}
|
||||
|
||||
addBuffer (buffer, options = {}) {
|
||||
return this.addBufferAtIndex(buffer, this.buffers.length, options)
|
||||
}
|
||||
|
||||
addBufferAtIndex (buffer, index, options = {}) {
|
||||
this.buffers.splice(index, 0, buffer)
|
||||
this.buffers.push(buffer)
|
||||
this.subscribeToBuffer(buffer)
|
||||
this.emitter.emit('did-add-buffer', buffer)
|
||||
return buffer
|
||||
|
||||
Reference in New Issue
Block a user