Target 0 instead of -Infinity to make the code a bit clearer.

This commit is contained in:
Jesse Grosjean
2015-04-02 12:25:16 -04:00
parent 82da0865bc
commit 0fe1ea1af3

View File

@@ -692,7 +692,7 @@ class DisplayBuffer extends Model
targetLeft = pixelPosition.left
defaultCharWidth = @defaultCharWidth
row = Math.floor(targetTop / @getLineHeightInPixels())
targetLeft = -Infinity if row < 0
targetLeft = 0 if row < 0
targetLeft = Infinity if row > @getLastRow()
row = Math.min(row, @getLastRow())
row = Math.max(0, row)