mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Remove RootView.proto.editorRemoved. Transfer remaining logic to Editor.proto.remove
This commit is contained in:
@@ -512,12 +512,8 @@ class Editor extends View
|
||||
return super if keepData
|
||||
@unsubscribeFromBuffer()
|
||||
rootView = @rootView()
|
||||
pane = @parent('.pane')
|
||||
paneParent = pane.parent()
|
||||
super
|
||||
pane.remove()
|
||||
paneParent.remove() if paneParent.is('.row:empty, .column:empty')
|
||||
rootView?.editorRemoved(this)
|
||||
if @pane() then @pane.remove() else super
|
||||
rootView?.focus()
|
||||
|
||||
unsubscribeFromBuffer: ->
|
||||
@buffer.off ".editor#{@id}"
|
||||
|
||||
@@ -77,13 +77,6 @@ class RootView extends View
|
||||
|
||||
@setTitle(editor.buffer.path)
|
||||
|
||||
editorRemoved: (editor) ->
|
||||
@adjustPaneDimensions()
|
||||
if @editors().length
|
||||
@editors()[0].focus()
|
||||
else
|
||||
@focus()
|
||||
|
||||
setTitle: (title='untitled') ->
|
||||
document.title = title
|
||||
|
||||
|
||||
Reference in New Issue
Block a user