mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Editors in #panes are always contained by .pane wrappers
This prepares us to refactor the split view and editor state code into Column, Row, and Pane objects.
This commit is contained in:
@@ -506,15 +506,17 @@ class Editor extends View
|
||||
split: (axis, side) ->
|
||||
return unless rootView = @rootView()
|
||||
editor = new Editor(@getEditorState())
|
||||
rootView.addPane(editor, this, axis, side)
|
||||
rootView.addPane(editor, this.parent(), axis, side)
|
||||
|
||||
remove: (selector, keepData) ->
|
||||
return super if keepData
|
||||
@unsubscribeFromBuffer()
|
||||
rootView = @rootView()
|
||||
parent = @parent()
|
||||
pane = @parent('.pane')
|
||||
paneParent = pane.parent()
|
||||
super
|
||||
parent.remove() if parent.is('.row:empty, .column:empty')
|
||||
pane.remove()
|
||||
paneParent.remove() if paneParent.is('.row:empty, .column:empty')
|
||||
rootView?.editorRemoved(this)
|
||||
|
||||
unsubscribeFromBuffer: ->
|
||||
|
||||
Reference in New Issue
Block a user