mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Avoid to call ::prepareScreenRows explicitly
This commit is contained in:
@@ -12,6 +12,8 @@ class LinesYardstick
|
||||
@pixelPositionsByLineIdAndColumn = {}
|
||||
|
||||
prepareScreenRowsForMeasurement: (screenRows) ->
|
||||
return unless @presenter.isBatching()
|
||||
|
||||
@presenter.setScreenRowsToMeasure(screenRows)
|
||||
@lineNodesProvider.updateSync(@presenter.getPreMeasurementState())
|
||||
|
||||
@@ -25,6 +27,8 @@ class LinesYardstick
|
||||
row = Math.min(row, @model.getLastScreenRow())
|
||||
row = Math.max(0, row)
|
||||
|
||||
@prepareScreenRowsForMeasurement([row])
|
||||
|
||||
line = @model.tokenizedLineForScreenRow(row)
|
||||
lineNode = @lineNodesProvider.lineNodeForLineIdAndScreenRow(line?.id, row)
|
||||
|
||||
@@ -73,7 +77,8 @@ class LinesYardstick
|
||||
|
||||
targetRow = screenPosition.row
|
||||
targetColumn = screenPosition.column
|
||||
baseCharacterWidth = @baseCharacterWidth
|
||||
|
||||
@prepareScreenRowsForMeasurement([targetRow])
|
||||
|
||||
top = targetRow * @model.getLineHeightInPixels()
|
||||
left = @leftPixelPositionForScreenPosition(targetRow, targetColumn)
|
||||
|
||||
Reference in New Issue
Block a user