diff --git a/src/editor.coffee b/src/editor.coffee index f4ae24ddc..d95445491 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 top + scrollToTop: -> + @setScrollTop(0) + # Essential: Scrolls the editor to the bottom scrollToBottom: -> @setScrollBottom(Infinity)