       @grammarRegistry, @packageManager, @assert
     })
     @buffer = @tokenizedBuffer.buffer
-    @displayLayer ?= @buffer.getDisplayLayer() ? @buffer.addDisplayLayer()
+    @displayLayer ?= @buffer.addDisplayLayer()
     @displayLayer.setTextDecorationLayer(@tokenizedBuffer)
     @charWidthsByScope = {}
     @defaultMarkerLayer = @displayLayer.addMarkerLayer()

    editorWidthInChars: @editorWidthInChars
    tokenizedBuffer: @tokenizedBuffer.serialize()
    largeFileMode: @largeFileMode

  copy: ->
    new DisplayBuffer({
      @buffer, tabLength: @getTabLength(), @largeFileMode, @config, @assert,
      @grammarRegistry, @packageManager, displayLayer: @displayLayer.copy()
    })

  resetDisplayLayer: ->


  @deserialize: (state, atomEnvironment) ->
    state.tokenizedBuffer = TokenizedBuffer.deserialize(state.tokenizedBuffer, atomEnvironment)
    state.displayLayer = state.tokenizedBuffer.buffer.getDisplayLayer(state.displayLayerId)
    state.config = atomEnvironment.config
    state.assert = atomEnvironment.assert
    state.grammarRegistry = atomEnvironment.grammars
