🐛 Avoid creating a useless extra tile

This commit is contained in:
Antonio Scandurra
2015-09-18 12:03:00 +02:00
parent 96de78f264
commit b773b60c7b
2 changed files with 7 additions and 16 deletions

View File

@@ -343,7 +343,7 @@ class TextEditorPresenter
updateVisibleTilesState: ->
return unless @startRow? and @endRow? and @lineHeight?
@updateTilesState([@startRow..@endRow])
@updateTilesState([@startRow...@endRow])
updateTilesState: (screenRows) ->
visibleTiles = {}
@@ -360,7 +360,7 @@ class TextEditorPresenter
while screenRowIndex >= 0
currentScreenRow = screenRows[screenRowIndex]
break if currentScreenRow < tileStartRow
rowsWithinTile.push(currentScreenRow)
rowsWithinTile.unshift(currentScreenRow)
screenRowIndex--
continue if rowsWithinTile.length is 0