Force a sync render when measuring if we don’t have a DOM node for a row

This commit is contained in:
Nathan Sobo
2016-01-04 16:40:56 -07:00
parent 9f6fbacddd
commit 6669703677
3 changed files with 12 additions and 0 deletions

View File

@@ -440,6 +440,8 @@ class TextEditorComponent
unless @presenter.isRowVisible(screenPosition.row)
@presenter.setScreenRowsToMeasure([screenPosition.row])
unless @linesComponent.lineNodeForLineIdAndScreenRow(@presenter.lineIdForScreenRow(screenPosition.row), screenPosition.row)?
@updateSyncPreMeasurement()
pixelPosition = @linesYardstick.pixelPositionForScreenPosition(screenPosition)

View File

@@ -1377,3 +1377,6 @@ class TextEditorPresenter
isRowVisible: (row) ->
@startRow <= row < @endRow
lineIdForScreenRow: (screenRow) ->
@model.tokenizedLineForScreenRow(screenRow)?.id