mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Fix cursor not being able to move within the last line of text.
This commit is contained in:
committed by
Kevin Sawicki
parent
88a95ad06b
commit
111b956f93
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user