mirror of
https://github.com/atom/atom.git
synced 2026-02-14 16:45:14 -05:00
Make RootView.open work with new Pane behavior
Still a bit of a WIP. Panes don't yet take the "active" class correctly when focused.
This commit is contained in:
committed by
probablycorey
parent
829bfa0a10
commit
bee1efed5c
@@ -92,15 +92,18 @@ class RootView extends View
|
||||
|
||||
open: (path, options = {}) ->
|
||||
if activePane = @getActivePane()
|
||||
if existingItem = activePane.itemForPath(path)
|
||||
activePane.showItem(existingItem)
|
||||
if editSession = activePane.itemForPath(path)
|
||||
activePane.showItem(editSession)
|
||||
else
|
||||
activePane.showItem(project.buildEditSession(path))
|
||||
editSession = project.buildEditSession(path)
|
||||
activePane.showItem(editSession)
|
||||
else
|
||||
activePane = new Pane(project.buildEditSession(path))
|
||||
editSession = project.buildEditSession(path)
|
||||
activePane = new Pane(editSession)
|
||||
@panes.append(activePane)
|
||||
|
||||
activePane.focus() if options.changeFocus
|
||||
editSession
|
||||
|
||||
editorFocused: (editor) ->
|
||||
@makeEditorActive(editor) if @panes.containsElement(editor)
|
||||
|
||||
Reference in New Issue
Block a user