Add a mock-based test for Editor.prototype.split and ensure it doesn't raise exceptions when not in a pane

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-04-13 11:40:29 -06:00
parent 54a15856bb
commit 1b2b1a324d
2 changed files with 27 additions and 4 deletions

View File

@@ -494,16 +494,16 @@ class Editor extends View
@setCursorBufferPosition(fold.start)
splitLeft: ->
@pane().splitLeft(@copy())
@pane()?.splitLeft(@copy())
splitRight: ->
@pane().splitRight(@copy())
@pane()?.splitRight(@copy())
splitUp: ->
@pane().splitUp(@copy())
@pane()?.splitUp(@copy())
splitDown: ->
@pane().splitDown(@copy())
@pane()?.splitDown(@copy())
pane: ->
@parent('.pane').view()