diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index cc988bbea..89c600515 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -1001,8 +1001,7 @@ class TextEditorPresenter @lineHeight? and @baseCharacterWidth? pixelPositionForScreenPosition: (screenPosition) -> - position = - @linesYardstick.pixelPositionForScreenPosition(screenPosition) + position = @linesYardstick.pixelPositionForScreenPosition(screenPosition) position.top -= @getScrollTop() position.left -= @getScrollLeft() @@ -1225,13 +1224,14 @@ class TextEditorPresenter screenRange.end.column = 0 repositionRegionWithinTile: (region, tileStartRow) -> - region.top += @scrollTop - @lineTopIndex.pixelPositionBeforeBlocksForRow(tileStartRow) - region.left += @scrollLeft + region.top += @scrollTop - @lineTopIndex.pixelPositionBeforeBlocksForRow(tileStartRow) buildHighlightRegions: (screenRange) -> lineHeightInPixels = @lineHeight startPixelPosition = @pixelPositionForScreenPosition(screenRange.start) endPixelPosition = @pixelPositionForScreenPosition(screenRange.end) + startPixelPosition.left += @scrollLeft + endPixelPosition.left += @scrollLeft spannedRows = screenRange.end.row - screenRange.start.row + 1 regions = []