mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Return the new pane's currentView when splitting the editor
This commit is contained in:
committed by
probablycorey
parent
106c6c3958
commit
062adae714
@@ -251,7 +251,7 @@ describe "RootView", ->
|
||||
fs.write(file2, "file2")
|
||||
rootView.open(file1)
|
||||
|
||||
editor1 = rootView.getActiveEditor()
|
||||
editor1 = rootView.getActiveView()
|
||||
buffer1 = editor1.activeEditSession.buffer
|
||||
expect(buffer1.getText()).toBe("file1")
|
||||
expect(buffer1.isModified()).toBe(false)
|
||||
|
||||
@@ -786,16 +786,16 @@ class Editor extends View
|
||||
@requestDisplayUpdate()
|
||||
|
||||
splitLeft: (editSession) ->
|
||||
@pane()?.splitLeft()
|
||||
@pane()?.splitLeft().currentView
|
||||
|
||||
splitRight: (editSession) ->
|
||||
@pane()?.splitRight()
|
||||
@pane()?.splitRight().currentView
|
||||
|
||||
splitUp: (editSession) ->
|
||||
@pane()?.splitUp()
|
||||
@pane()?.splitUp().currentView
|
||||
|
||||
splitDown: (editSession) ->
|
||||
@pane()?.splitDown()
|
||||
@pane()?.splitDown().currentView
|
||||
|
||||
pane: ->
|
||||
@closest('.pane').view()
|
||||
|
||||
Reference in New Issue
Block a user