Add ignoreScrollPastEnd

This commit is contained in:
joshaber
2016-02-25 16:59:58 -05:00
parent 1b6325494d
commit ff0b9e30a9
4 changed files with 13 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ class TextEditorPresenter
minimumReflowInterval: 200
constructor: (params) ->
{@model, @config, @lineTopIndex} = params
{@model, @config, @lineTopIndex, @ignoreScrollPastEnd} = params
{@cursorBlinkPeriod, @cursorBlinkResumeDelay, @stoppedScrollingDelay, @tileSize} = params
{@contentFrameWidth} = params
@@ -661,7 +661,7 @@ class TextEditorPresenter
return unless @contentHeight? and @clientHeight?
contentHeight = @contentHeight
if @scrollPastEnd
if @scrollPastEnd and not @ignoreScrollPastEnd
extraScrollHeight = @clientHeight - (@lineHeight * 3)
contentHeight += extraScrollHeight if extraScrollHeight > 0
scrollHeight = Math.max(contentHeight, @height)