Fix cursor not being able to move within the last line of text.

This commit is contained in:
Adam Boesch
2014-09-16 21:18:59 -05:00
committed by Kevin Sawicki
parent 88a95ad06b
commit 111b956f93

View File

@@ -661,9 +661,8 @@ class DisplayBuffer extends Model
targetTop = pixelPosition.top
targetLeft = pixelPosition.left
defaultCharWidth = @defaultCharWidth
rawRowCount = targetTop / @getLineHeightInPixels()
isLastRow = rawRowCount > @getLastRow()
row = Math.floor(rawRowCount)
row = Math.floor(targetTop / @getLineHeightInPixels())
isLastRow = row > @getLastRow()
row = Math.min(row, @getLastRow())
row = Math.max(0, row)