Allow scrollPastEnd to be updated in TextEditor.prototype.update

This commit is contained in:
Antonio Scandurra
2016-06-30 15:07:20 +02:00
parent c769b169aa
commit ccf73189ee
2 changed files with 6 additions and 2 deletions

View File

@@ -189,7 +189,7 @@ class TextEditor extends Model
update: (params) ->
{
softTabs, tabLength, softWrapped, mini, placeholderText, lineNumberGutterVisible,
showInvisibles, ignoreInvisibles, editorWidthInChars
showInvisibles, ignoreInvisibles, editorWidthInChars, scrollPastEnd
} = params
resetDisplayLayer = false
@@ -226,6 +226,9 @@ class TextEditor extends Model
@setEditorWidthInChars(editorWidthInChars, false)
resetDisplayLayer = true
if scrollPastEnd? and scrollPastEnd isnt @scrollPastEnd
@setScrollPastEnd(scrollPastEnd)
if resetDisplayLayer
@resetDisplayLayer()