mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Return a clone of @buffers from Project.getBuffers
Previously, we traversed the EditSessions. Not necessary.
This commit is contained in:
@@ -190,10 +190,7 @@ class Project
|
||||
#
|
||||
# Returns an {Array} of {Buffer}s.
|
||||
getBuffers: ->
|
||||
buffers = []
|
||||
for editSession in @editSessions when not _.include(buffers, editSession.buffer)
|
||||
buffers.push editSession.buffer
|
||||
buffers
|
||||
new Array(@buffers...)
|
||||
|
||||
# Given a file path, this retrieves or creates a new {Buffer}.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user