   observeModel: ->
     @disposables.add @model.onDidChange =>
       @updateContentHeight()
+      @updateContentWidth()
 
       @updateHeightState()
       @updateVerticalScrollState()

    Math.min(@model.getScreenLineCount(), endRow)

  computeScrollWidth: ->
    Math.max(@computeContentWidth(), @computeClientWidth())

  computeScrollHeight: ->
    contentHeight = @contentHeight


    verticalScrollbarVisible =
      @contentHeight > clientHeightWithoutHorizontalScrollbar or
        @contentHeight > clientHeightWithHorizontalScrollbar and @contentWidth > clientWidthWithoutVerticalScrollbar

    if verticalScrollbarVisible
      @verticalScrollbarWidth
