     editorWidthInChars: @editorWidthInChars
     tokenizedBuffer: @tokenizedBuffer.serialize()
     largeFileMode: @largeFileMode
+    displayLayerId: @displayLayer.id
 
   copy: ->
     new DisplayBuffer({
       @buffer, tabLength: @getTabLength(), @largeFileMode, @config, @assert,
-      @grammarRegistry, @packageManager, displayLayer: @displayLayer.copy()
+      @grammarRegistry, @packageManager, displayLayer: @buffer.copyDisplayLayer(@displayLayer.id)
     })
 
   resetDisplayLayer: ->

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


  @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
