Disable autoHeight on text editor pane items

This commit is contained in:
Nathan Sobo
2016-08-18 14:01:08 -06:00
parent f723bccc29
commit dd82902bf2
2 changed files with 3 additions and 1 deletions

View File

@@ -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", ->

View File

@@ -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?