 
   disconnect: ->
     @pusher.disconnect()
+    @clearMarkers(@markerColour)
     @hidePanel()
 
   serialize: ->

    atom.views.getView(@editor).setAttribute('id', 'pusht')

    buffer = @buffer = @editor.buffer

    # $('atom-text-editor#pusht::shadow .line-number.cursor-line').addClass(@markerColour)
    # @syncMarker()

    @pusher = new Pusher @app_key,
      authTransport: 'client'

        @editor.scrollToBufferPosition(oldRange.start)
        @addMarker oldRange.start.toArray()[0], data.colour
      else
        if newRange.end.toArray()[0] > @editor.getLastBufferRow()
          target = $('atom-text-editor#pusht::shadow .line-numbers')[0]
          self = @
          observer = new MutationObserver (mutations) ->
            self.addMarker(newRange.end.toArray()[0], data.colour)
            @disconnect()
          config = {attributes: true, childList: true, characterData: true}
          observer.observe(target, config)

        buffer.insert newRange.start, newText
        @editor.scrollToBufferPosition(newRange.start)
        # console.log($("atom-text-editor#pusht::shadow .line-number-1"))
        # @addMarker(newRange.end.toArray()[0], data.colour)


      triggerPush = true

