From 5ae040f6887c2ec27156a14cf475106f4917bdb7 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 4 Sep 2014 15:17:17 -0700 Subject: [PATCH] Add Editor::scrollToTop to compliment scrollToBottom() --- src/editor.coffee | 4 ++++ 1 file changed, 4 insertions(+) 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)