Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Deprecate obvious EditorView methods #3457

Merged
merged 7 commits into from
Sep 4, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Deprecate EditorView::scrollToBottom
  • Loading branch information
benogle committed Sep 4, 2014
commit c511a714886b17fb8d7dae505abe7d2eead51fc0
2 changes: 1 addition & 1 deletion src/editor-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down
4 changes: 4 additions & 0 deletions src/editor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down