mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Target 0 instead of -Infinity to make the code a bit clearer.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user