Commit 0362e1cc authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #609 from ethereum/gotoLine-rob

adding gotoLine to the remix scroller
parents 52b93b83 5fdd77f0
...@@ -753,6 +753,8 @@ var run = function () { ...@@ -753,6 +753,8 @@ var run = function () {
switchToFile(source) switchToFile(source)
} }
this.statementMarker = editor.addMarker(lineColumnPos, 'highlightcode') this.statementMarker = editor.addMarker(lineColumnPos, 'highlightcode')
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