 {spliceArray, newlineRegex, normalizePatchChanges, regexIsSingleLine, extentForText, debounce} = require './helpers'
 {traversal} = require './point-helpers'
 Grim = require 'grim'
-
 
 class HistoryShim
   constructor: () ->

    @buffer = new NativeTextBuffer(text)
    @debouncedEmitDidStopChangingEvent = debounce(@emitDidStopChangingEvent.bind(this), @stoppedChangingDelay)
    @textDecorationLayers = new Set()
    @nextMarkerLayerId = 0
    @nextDisplayLayerId = 0
    @defaultMarkerLayer = new MarkerLayer(this, String(@nextMarkerLayerId++))

    @nextMarkerId = 1
    @outstandingSaveCount = 0
    @loadCount = 0

    @setEncoding(params?.encoding)
    @setPreferredLineEnding(params?.preferredLineEnding)
