diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 6533a2f8..4b1ee6df 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -1292,12 +1292,20 @@ var VirtualRenderer = function(container, theme) { this.$loop.schedule(this.CHANGE_H_SCROLL); }; + /** + * Scrolls the editor across both x- and y-axes. + * @param {Number} x The x value to scroll to + * @param {Number} y The y value to scroll to + **/ + this.scrollTo = function(x, y) { + this.session.setScrollTop(y); + this.session.setScrollLeft(y); + }; + /** * Scrolls the editor across both x- and y-axes. * @param {Number} deltaX The x value to scroll by * @param {Number} deltaY The y value to scroll by - * - * **/ this.scrollBy = function(deltaX, deltaY) { deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);