Deprecate EditorView::scrollToBottom

This commit is contained in:
Ben Ogle
2014-09-04 15:17:01 -07:00
parent 04b0ed9704
commit c511a71488
2 changed files with 5 additions and 1 deletions

View File

@@ -169,8 +169,8 @@ class EditorView extends View
else
@editor.getScrollLeft()
# Public: Scrolls the editor to the bottom.
scrollToBottom: ->
deprecate 'Use Editor::scrollToBottom instead. You can get the editor via editorView.getModel()'
@editor.setScrollBottom(Infinity)
scrollToScreenPosition: (screenPosition, options) ->

View File

@@ -2319,6 +2319,10 @@ class Editor extends Model
scrollToScreenPosition: (screenPosition, options) ->
@displayBuffer.scrollToScreenPosition(screenPosition, options)
# Essential: Scrolls the editor to the bottom
scrollToBottom: ->
@setScrollBottom(Infinity)
scrollToScreenRange: (screenRange, options) -> @displayBuffer.scrollToScreenRange(screenRange, options)
horizontallyScrollable: -> @displayBuffer.horizontallyScrollable()