diff --git a/spec/fake-lines-yardstick.coffee b/spec/fake-lines-yardstick.coffee index 9934b1917..1872b8c65 100644 --- a/spec/fake-lines-yardstick.coffee +++ b/spec/fake-lines-yardstick.coffee @@ -7,6 +7,7 @@ class FakeLinesYardstick prepareScreenRowsForMeasurement: -> @presenter.getPreMeasurementState() + @screenRows = new Set(@presenter.getScreenRows()) getScopedCharacterWidth: (scopeNames, char) -> @getScopedCharacterWidths(scopeNames)[char] @@ -34,6 +35,8 @@ class FakeLinesYardstick left = 0 column = 0 + return {top, left: 0} unless @screenRows.has(screenPosition.row) + iterator = @model.tokenizedLineForScreenRow(targetRow).getTokenIterator() while iterator.next() characterWidths = @getScopedCharacterWidths(iterator.getScopes())