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