mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Add RootView.modifiedBuffers()
This commit is contained in:
@@ -123,6 +123,14 @@ class RootView extends View
|
||||
editors: ->
|
||||
@panes.find('.editor').map -> $(this).view()
|
||||
|
||||
modifiedBuffers: ->
|
||||
modifiedBuffers = []
|
||||
for editor in @editors()
|
||||
for session in editor.editSessions
|
||||
modifiedBuffers.push session.buffer if session.buffer.isModified()
|
||||
|
||||
modifiedBuffers
|
||||
|
||||
activeEditor: ->
|
||||
if (editor = @panes.find('.editor.active')).length
|
||||
editor.view()
|
||||
|
||||
Reference in New Issue
Block a user