Merge pull request #609 from ethereum/gotoLine-rob

adding gotoLine to the remix scroller
pull/1/head
yann300 7 years ago committed by GitHub
commit 0362e1cc17
  1. 2
      src/app.js
  2. 4
      src/app/editor.js

@ -753,6 +753,8 @@ var run = function () {
switchToFile(source)
}
this.statementMarker = editor.addMarker(lineColumnPos, 'highlightcode')
editor.scrollToLine(lineColumnPos.start.line, true, true, function () {})
if (lineColumnPos.start.line === lineColumnPos.end.line) {
this.fullLineMarker = editor.addMarker({
start: {

@ -152,6 +152,10 @@ function Editor (editorElement) {
return editor.session.addMarker(currentRange, cssClass)
}
this.scrollToLine = function (line, center, animate, callback) {
editor.scrollToLine(line, center, animate, callback)
}
this.removeMarker = function (markerId) {
editor.session.removeMarker(markerId)
}

Loading…
Cancel
Save