mirror of
https://github.com/atom/atom.git
synced 2026-02-14 16:45:14 -05:00
Update document edited status in workspace model
This also fixes a previous oversight where the status wasn’t updated when switching between pane items with different modified status.
This commit is contained in:
@@ -107,8 +107,6 @@ class WorkspaceView extends View
|
||||
@subscribe $(window), 'focus', (e) =>
|
||||
@handleFocus(e) if document.activeElement is document.body
|
||||
|
||||
@on 'pane:active-item-modified-status-changed', '.active.pane', => @updateDocumentEdited()
|
||||
|
||||
@command 'application:about', -> ipc.send('command', 'application:about')
|
||||
@command 'application:run-all-specs', -> ipc.send('command', 'application:run-all-specs')
|
||||
@command 'application:run-benchmarks', -> ipc.send('command', 'application:run-benchmarks')
|
||||
@@ -344,12 +342,6 @@ class WorkspaceView extends View
|
||||
confirmClose: ->
|
||||
@model.confirmClose()
|
||||
|
||||
# On OS X, fades the application window's proxy icon when the current file
|
||||
# has been modified.
|
||||
updateDocumentEdited: ->
|
||||
modified = @model.getActivePaneItem()?.isModified?() ? false
|
||||
atom.setDocumentEdited(modified)
|
||||
|
||||
# Get all editor views.
|
||||
#
|
||||
# You should prefer {Workspace::getEditors} unless you absolutely need access
|
||||
|
||||
Reference in New Issue
Block a user