diff --git a/src/react-editor-view.coffee b/src/react-editor-view.coffee index 3a7b8ee37..a7a1e4622 100644 --- a/src/react-editor-view.coffee +++ b/src/react-editor-view.coffee @@ -65,12 +65,22 @@ class ReactEditorView extends View else @editor.getScrollLeft() + scrollToBottom: -> + @editor.setScrollBottom(Infinity) + scrollToScreenPosition: (screenPosition) -> @editor.scrollToScreenPosition(screenPosition) scrollToBufferPosition: (bufferPosition) -> @editor.scrollToBufferPosition(bufferPosition) + scrollToCursorPosition: -> + @editor.scrollToCursorPosition() + + scrollToPixelPosition: (pixelPosition) -> + screenPosition = screenPositionForPixelPosition(pixelPosition) + @editor.scrollToScreenPosition(screenPosition) + pixelPositionForBufferPosition: (bufferPosition) -> @editor.pixelPositionForBufferPosition(bufferPosition)