From dd82902bf22d10f2ad45b70cba5f2cfd81d8aeea Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 18 Aug 2016 14:01:08 -0600 Subject: [PATCH] Disable autoHeight on text editor pane items --- spec/text-editor-spec.coffee | 2 ++ src/workspace.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index 17ce81301..9431673d6 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -5508,11 +5508,13 @@ describe "TextEditor", -> describe "auto height", -> it "returns true by default but can be customized", -> + editor = atom.workspace.buildTextEditor() expect(editor.getAutoHeight()).toBe(true) editor.update({autoHeight: false}) expect(editor.getAutoHeight()).toBe(false) editor.update({autoHeight: true}) expect(editor.getAutoHeight()).toBe(true) + editor.destroy() describe "auto width", -> it "returns false by default but can be customized", -> diff --git a/src/workspace.coffee b/src/workspace.coffee index d49fe7d69..7fb893ca5 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -561,7 +561,7 @@ class Workspace extends Model throw error @project.bufferForPath(filePath, options).then (buffer) => - @textEditorRegistry.build(Object.assign({buffer, largeFileMode}, options)) + @textEditorRegistry.build(Object.assign({buffer, largeFileMode, autoHeight: false}, options)) handleGrammarUsed: (grammar) -> return unless grammar?