mirror of
https://github.com/atom/atom.git
synced 2026-02-15 00:55:14 -05:00
Don't translate screen to pixel positions if Editor isn't on the DOM
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user