mirror of
https://github.com/atom/atom.git
synced 2026-01-26 15:28:27 -05:00
Ensure we have at least one line per tile
This will prevent, for example, a mini editor (which has no `@height` by default) from not showing characters.
This commit is contained in:
@@ -306,6 +306,7 @@ class TextEditorPresenter
|
||||
return unless @startRow? and @endRow? and @lineHeight?
|
||||
|
||||
linesPerTile = Math.floor(@height / @lineHeight / @tileCount)
|
||||
linesPerTile = Math.max(1, linesPerTile)
|
||||
|
||||
startIndex = Math.max(
|
||||
0, Math.floor(@startRow / linesPerTile) - @tileOverdrawMargin
|
||||
|
||||
Reference in New Issue
Block a user