 DummyLineNode = $$(-> @div className: 'line', style: 'position: absolute; visibility: hidden;', => @span 'x')[0]
 AcceptFilter = {acceptNode: -> NodeFilter.FILTER_ACCEPT}
 WrapperDiv = document.createElement('div')
+
+cloneObject = (object) ->
+  clone = {}
+  clone[key] = value for key, value of object
+  clone
 
 module.exports =
 class LinesComponent

        unless oldDecorationClasses? and decorationClass in oldDecorationClasses
          lineNode.classList.add(decorationClass)

    lineNode.style.width = scrollWidth + 'px'
    lineNode.style.top = top + 'px'
    lineNode.dataset.screenRow = screenRow
    @screenRowsByLineId[id] = screenRow
    @lineIdsByScreenRow[screenRow] = id

  lineNodeForScreenRow: (screenRow) ->
    @lineNodesByLineId[@lineIdsByScreenRow[screenRow]]


    @removeLineNodes() unless @oldState.indentGuidesVisible is @newState.indentGuidesVisible
    @updateLineNodes()

    if @newState.scrollWidth isnt @oldState.scrollWidth
      @domNode.style.width = @newState.scrollWidth + 'px'
      @oldState.scrollWidth = @newState.scrollWidth

    @measureCharactersInNewLines() if visible and not @newState.scrollingVertically

    @cursorsComponent.updateSync()
