mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Remove code for setting the active editor from root view
Supplanted by "active pane"
This commit is contained in:
committed by
probablycorey
parent
ae95c04bbc
commit
3bf31e440d
@@ -346,7 +346,6 @@ class Editor extends View
|
||||
false
|
||||
|
||||
@hiddenInput.on 'focus', =>
|
||||
rootView?.editorFocused(this)
|
||||
@isFocused = true
|
||||
@addClass 'is-focused'
|
||||
|
||||
|
||||
@@ -105,26 +105,6 @@ class RootView extends View
|
||||
activePane.focus() if changeFocus
|
||||
editSession
|
||||
|
||||
editorFocused: (editor) ->
|
||||
@makeEditorActive(editor) if @panes.containsElement(editor)
|
||||
|
||||
makeEditorActive: (editor, focus) ->
|
||||
if focus
|
||||
editor.focus()
|
||||
return
|
||||
|
||||
previousActiveEditor = @panes.find('.editor.active').view()
|
||||
previousActiveEditor?.removeClass('active').off('.root-view')
|
||||
editor.addClass('active')
|
||||
|
||||
if not editor.mini
|
||||
editor.on 'editor:path-changed.root-view', =>
|
||||
@trigger 'root-view:active-path-changed', editor.getPath()
|
||||
|
||||
if not previousActiveEditor or editor.getPath() != previousActiveEditor.getPath()
|
||||
@trigger 'root-view:active-path-changed', editor.getPath()
|
||||
|
||||
|
||||
updateTitle: ->
|
||||
if projectPath = project.getPath()
|
||||
if item = @getActivePaneItem()
|
||||
|
||||
Reference in New Issue
Block a user