mirror of
https://github.com/atom/atom.git
synced 2026-02-12 23:55:10 -05:00
🐛 Avoid creating a useless extra tile
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user