From c511a714886b17fb8d7dae505abe7d2eead51fc0 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 4 Sep 2014 15:17:01 -0700 Subject: [PATCH] Deprecate EditorView::scrollToBottom --- src/editor-view.coffee | 2 +- src/editor.coffee | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/editor-view.coffee b/src/editor-view.coffee index 8d9421a52..544f77288 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -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) -> diff --git a/src/editor.coffee b/src/editor.coffee index 7ea4f888b..f4ae24ddc 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -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()