This commit is contained in:
Ting-Kuan 2014-03-24 10:54:59 -04:00
parent 656b34fc34
commit e9118142db

View file

@ -103,8 +103,8 @@ module.exports = class SpellToolbarView extends View
updateScroll: -> updateScroll: ->
return unless statementStart = @callState?.statements?[@statementIndex]?.range[0] return unless statementStart = @callState?.statements?[@statementIndex]?.range[0]
text = @ace.getValue() text = @ace.getValue() # code in editor
currentLine = text.substr(0, statementStart).split('\n').length - 1 currentLine = statementStart.row
@ace.scrollToLine currentLine, true, true @ace.scrollToLine currentLine, true, true
setCallState: (callState, statementIndex, @callIndex, @metrics) -> setCallState: (callState, statementIndex, @callIndex, @metrics) ->