Don't translate screen to pixel positions if Editor isn't on the DOM

This commit is contained in:
Nathan Sobo
2013-02-12 16:26:01 -07:00
parent 97988eb62e
commit 498c11a080

View File

@@ -1191,6 +1191,7 @@ class Editor extends View
@pixelPositionForScreenPosition(@screenPositionForBufferPosition(position))
pixelPositionForScreenPosition: (position) ->
return { top: 0, left: 0 } unless @isOnDom()
{row, column} = Point.fromObject(position)
[lineElement] = @buildLineElementsForScreenRows(row, row)
@renderedLines.append(lineElement)