Enforce stricter requirements for Editor.getPane()

Previously it would return the closest '.pane' element
which would cause an editor inside of another editor
to report having a pane such as in the autocomplete view.
This commit is contained in:
Kevin Sawicki
2013-03-25 17:06:59 -04:00
parent 67adce6a99
commit 6f8c07e917
3 changed files with 9 additions and 9 deletions

View File

@@ -639,19 +639,19 @@ class Editor extends View
@requestDisplayUpdate()
splitLeft: (items...) ->
@pane()?.splitLeft(items...).activeView
@getPane()?.splitLeft(items...).activeView
splitRight: (items...) ->
@pane()?.splitRight(items...).activeView
@getPane()?.splitRight(items...).activeView
splitUp: (items...) ->
@pane()?.splitUp(items...).activeView
@getPane()?.splitUp(items...).activeView
splitDown: (items...) ->
@pane()?.splitDown(items...).activeView
@getPane()?.splitDown(items...).activeView
pane: ->
@closest('.pane').view()
getPane: ->
@parent('.item-views').parent('.pane').view()
remove: (selector, keepData) ->
return super if keepData or @removed