Use ::bottomPixelPositionForRow to scroll logically

This commit is contained in:
Antonio Scandurra
2015-12-02 17:21:12 +01:00
parent 5228471bc5
commit 87c8694d01

View File

@@ -1514,8 +1514,8 @@ class TextEditorPresenter
verticalScrollMarginInPixels = @getVerticalScrollMarginInPixels()
top = @lineTopIndex.topPixelPositionForRow(screenRange.start.row)
bottom = @lineTopIndex.topPixelPositionForRow(screenRange.end.row + 1)
top = @lineTopIndex.bottomPixelPositionForRow(screenRange.start.row)
bottom = @lineTopIndex.bottomPixelPositionForRow(screenRange.end.row + 1)
if options?.center
desiredScrollCenter = (top + bottom) / 2