Merge branch 'master' into atom-textarea

This commit is contained in:
joshaber
2016-02-25 16:05:59 -05:00
2 changed files with 3 additions and 3 deletions

View File

@@ -3232,7 +3232,7 @@ class TextEditor extends Model
# top of the visible area.
setFirstVisibleScreenRow: (screenRow, fromView) ->
unless fromView
maxScreenRow = @getLineCount() - 1
maxScreenRow = @getScreenLineCount() - 1
unless @config.get('editor.scrollPastEnd')
height = @displayBuffer.getHeight()
lineHeightInPixels = @displayBuffer.getLineHeightInPixels()
@@ -3250,7 +3250,7 @@ class TextEditor extends Model
height = @displayBuffer.getHeight()
lineHeightInPixels = @displayBuffer.getLineHeightInPixels()
if height? and lineHeightInPixels?
Math.min(@firstVisibleScreenRow + Math.floor(height / lineHeightInPixels), @getLineCount() - 1)
Math.min(@firstVisibleScreenRow + Math.floor(height / lineHeightInPixels), @getScreenLineCount() - 1)
else
null