diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index ec2dc63b4..2e94307b6 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -200,21 +200,13 @@ class DisplayBuffer extends Model setVerticalScrollbarWidth: (@verticalScrollbarWidth) -> @verticalScrollbarWidth getHeight: -> - if @height? - @height - else - if @horizontallyScrollable() - @getScrollHeight() + @getHorizontalScrollbarHeight() - else - @getScrollHeight() + @height or 0 - setHeight: (@height) -> @height + setHeight: (@height) -> + @height getClientHeight: (reentrant) -> - if @horizontallyScrollable(reentrant) - @getHeight() - @getHorizontalScrollbarHeight() - else - @getHeight() + @getHeight() getClientWidth: (reentrant) -> if @verticallyScrollable(reentrant) diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 3bba67275..c999b51de 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -50,7 +50,7 @@ class TextEditorPresenter @emitter.emit "did-update-state" if @isBatching() transferMeasurementsToModel: -> - @model.setHeight(@explicitHeight) if @explicitHeight? + # @model.setHeight(@explicitHeight) if @explicitHeight? @model.setWidth(@contentFrameWidth) if @contentFrameWidth? @model.setLineHeightInPixels(@lineHeight) if @lineHeight? @model.setDefaultCharWidth(@baseCharacterWidth) if @baseCharacterWidth? @@ -688,6 +688,7 @@ class TextEditorPresenter clientHeight = @height - @horizontalScrollbarHeight unless @clientHeight is clientHeight @clientHeight = clientHeight + @model.setHeight(@clientHeight) @updateScrollHeight() @updateScrollTop() @@ -919,7 +920,6 @@ class TextEditorPresenter setExplicitHeight: (explicitHeight) -> unless @explicitHeight is explicitHeight @explicitHeight = explicitHeight - @model.setHeight(explicitHeight) @updateHeight() @shouldUpdateVerticalScrollState = true @shouldUpdateScrollbarsState = true