mirror of
https://github.com/atom/atom.git
synced 2026-02-09 14:15:24 -05:00
Rename RootView.editors -> getEditors
This commit is contained in:
@@ -112,7 +112,7 @@ class RootView extends View
|
||||
return true
|
||||
|
||||
if allowActiveEditorChange
|
||||
for editor in @editors()
|
||||
for editor in @getEditors()
|
||||
if editor.activateEditSessionForPath(path)
|
||||
editor.focus()
|
||||
return true
|
||||
@@ -142,19 +142,19 @@ class RootView extends View
|
||||
setTitle: (title='untitled') ->
|
||||
document.title = title
|
||||
|
||||
editors: ->
|
||||
getEditors: ->
|
||||
@panes.find('.editor').map(-> $(this).view()).toArray()
|
||||
|
||||
modifiedBuffers: ->
|
||||
modifiedBuffers = []
|
||||
for editor in @editors()
|
||||
for editor in @getEditors()
|
||||
for session in editor.editSessions
|
||||
modifiedBuffers.push session.buffer if session.buffer.isModified()
|
||||
|
||||
modifiedBuffers
|
||||
|
||||
getOpenBufferPaths: ->
|
||||
_.uniq(_.flatten(@editors().map (editor) -> editor.getOpenBufferPaths()))
|
||||
_.uniq(_.flatten(@getEditors().map (editor) -> editor.getOpenBufferPaths()))
|
||||
|
||||
getActiveEditor: ->
|
||||
if (editor = @panes.find('.editor.active')).length
|
||||
@@ -182,7 +182,7 @@ class RootView extends View
|
||||
rootPane?.adjustDimensions()
|
||||
|
||||
remove: ->
|
||||
editor.remove() for editor in @editors()
|
||||
editor.remove() for editor in @getEditors()
|
||||
@project.destroy()
|
||||
super
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class StatusBar extends View
|
||||
@activate: (rootView) ->
|
||||
requireStylesheet 'status-bar.css'
|
||||
|
||||
for editor in rootView.editors()
|
||||
for editor in rootView.getEditors()
|
||||
@appendToEditorPane(rootView, editor) if rootView.parents('html').length
|
||||
|
||||
rootView.on 'editor-open', (e, editor) =>
|
||||
|
||||
Reference in New Issue
Block a user