Commit 4df7e799 authored by Rob Stupay's avatar Rob Stupay Committed by yann300

using scrollToLine instead of gotoLine

parent 90c362c2
...@@ -753,7 +753,9 @@ var run = function () { ...@@ -753,7 +753,9 @@ var run = function () {
switchToFile(source) switchToFile(source)
} }
this.statementMarker = editor.addMarker(lineColumnPos, 'highlightcode') this.statementMarker = editor.addMarker(lineColumnPos, 'highlightcode')
editor.gotoLine(lineColumnPos.start.line, lineColumnPos.start.column)
editor.scrollToLine(lineColumnPos.start.line, true, true, function () {})
if (lineColumnPos.start.line === lineColumnPos.end.line) { if (lineColumnPos.start.line === lineColumnPos.end.line) {
this.fullLineMarker = editor.addMarker({ this.fullLineMarker = editor.addMarker({
start: { start: {
......
...@@ -152,6 +152,10 @@ function Editor (editorElement) { ...@@ -152,6 +152,10 @@ function Editor (editorElement) {
return editor.session.addMarker(currentRange, cssClass) return editor.session.addMarker(currentRange, cssClass)
} }
this.scrollToLine = function (line, center, animate, callback) {
editor.scrollToLine(line, center, animate, callback)
}
this.removeMarker = function (markerId) { this.removeMarker = function (markerId) {
editor.session.removeMarker(markerId) editor.session.removeMarker(markerId)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment