   setWidth: (newWidth) ->
     oldWidth = @width
     @width = newWidth
-    @updateWrappedScreenLines() if newWidth isnt oldWidth and @isSoftWrapped()
+    @resetDisplayLayer() if newWidth isnt oldWidth and @isSoftWrapped()
     @width
 
   getLineHeightInPixels: -> @lineHeightInPixels

      @doubleWidthCharWidth = doubleWidthCharWidth
      @halfWidthCharWidth = halfWidthCharWidth
      @koreanCharWidth = koreanCharWidth
      @updateWrappedScreenLines() if @isSoftWrapped() and @getEditorWidthInChars()?
    defaultCharWidth

  getCursorWidth: -> 1

      @grammarRegistry, @packageManager
    })

  resetDisplayLayer: ->
    scopeDescriptor = @getRootScopeDescriptor()
    invisibles =
      if @config.get('editor.showInvisibles', scope: scopeDescriptor)
        @config.get('editor.invisibles', scope: scopeDescriptor)
      else
        {}

    softWrapColumn =
      if @isSoftWrapped()
        if @config.get('editor.softWrapAtPreferredLineLength', scope: scopeDescriptor)
          @config.get('editor.preferredLineLength', scope: scopeDescriptor)
        else
          @getEditorWidthInChars()
      else
        Infinity

    @displayLayer.reset({
      invisibles: invisibles
      softWrapColumn: softWrapColumn
      showIndentGuides: @config.get('editor.showIndentGuide', scope: scopeDescriptor)
      tabLength: @config.get('editor.tabLength', scope: scopeDescriptor),
      ratioForCharacter: -> 1.0 # TODO: replace this with korean/double/half width characters.
    })

  updateAllScreenLines: ->
    return # TODO: After DisplayLayer is finished, delete these code paths
    @maxLineLength = 0
