mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Add Editor::scrollToTop to compliment scrollToBottom()
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user