diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index d504b1b2d..b892f59eb 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -100,7 +100,8 @@ describe "TextEditor", -> editor.onDidChange(changeSpy = jasmine.createSpy('onDidChange')) editor.update({ tabLength: 6, softTabs: false, softWrapped: true, editorWidthInChars: 40, - ignoreInvisibles: true, mini: false, lineNumberGutterVisible: false, scrollPastEnd: true + ignoreInvisibles: true, mini: false, lineNumberGutterVisible: false, scrollPastEnd: true, + autoHeight: false }) expect(changeSpy.callCount).toBe(1) expect(editor.getTabLength()).toBe(6) @@ -111,6 +112,7 @@ describe "TextEditor", -> expect(editor.isMini()).toBe(false) expect(editor.isLineNumberGutterVisible()).toBe(false) expect(editor.getScrollPastEnd()).toBe(true) + expect(editor.getAutoHeight()).toBe(false) describe "config defaults", -> it "uses the `editor.tabLength`, `editor.softWrap`, and `editor.softTabs`, and `core.fileEncoding` config values", -> diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 9ff67ce92..560d06768 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -188,7 +188,7 @@ class TextEditor extends Model update: (params) -> { softTabs, tabLength, softWrapped, mini, placeholderText, lineNumberGutterVisible, - showInvisibles, ignoreInvisibles, editorWidthInChars, scrollPastEnd + showInvisibles, ignoreInvisibles, editorWidthInChars, scrollPastEnd, autoHeight } = params resetDisplayLayer = false @@ -228,6 +228,9 @@ class TextEditor extends Model if scrollPastEnd? and scrollPastEnd isnt @scrollPastEnd @setScrollPastEnd(scrollPastEnd) + if autoHeight? and autoHeight isnt @autoHeight + @setAutoHeight(autoHeight) + if resetDisplayLayer @resetDisplayLayer()