mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Make RootView.getModifiedBuffers work w/ new system
Eventually, this should probably become getModifiedPaneItems so that all kinds of items are given an opportunity to participate in the saving system.
This commit is contained in:
committed by
probablycorey
parent
2bfc73afaa
commit
279ebc0958
@@ -11,6 +11,7 @@ Pane = require 'pane'
|
||||
PaneColumn = require 'pane-column'
|
||||
PaneRow = require 'pane-row'
|
||||
PaneContainer = require 'pane-container'
|
||||
EditSession = require 'edit-session'
|
||||
|
||||
module.exports =
|
||||
class RootView extends View
|
||||
@@ -139,10 +140,9 @@ class RootView extends View
|
||||
|
||||
getModifiedBuffers: ->
|
||||
modifiedBuffers = []
|
||||
for editor in @getEditors()
|
||||
for session in editor.editSessions
|
||||
modifiedBuffers.push session.buffer if session.buffer.isModified()
|
||||
|
||||
for pane in @getPanes()
|
||||
for item in pane.getItems() when item instanceof EditSession
|
||||
modifiedBuffers.push item.buffer if item.buffer.isModified()
|
||||
modifiedBuffers
|
||||
|
||||
getOpenBufferPaths: ->
|
||||
|
||||
Reference in New Issue
Block a user