       buffer.append(chunk)
       @triggerPush = true
 
-    @pairingChannel.bind 'client-change', (events) => _.each(events, (event) => @changeBuffer(event) )
+    @pairingChannel.bind 'client-change', (events) =>
+      _.each(events, (event) =>
+        @changeBuffer(event) if event.eventType is 'buffer-change'
+        if event.eventType is 'buffer-selection'
+          console.log 'hello'
+          @updateCollaboratorMarker(event)
+      )
 
     @pairingChannel.bind 'client-disconnected', (data) =>
       @clearMarkers(data.colour)

    @editorListeners.add @listenToBufferChanges()
    @editorListeners.add @syncSelectionRange()

  listenToBufferChanges: ->
    @buffer.onDidChange (event) =>
      return unless @triggerPush
      deletion = !(event.newText is "\n") and (event.newText.length is 0)
      event = {deletion: deletion, event: event, colour: @markerColour}
      @events.push(event)

  triggerEventQueue: ->
    @eventInterval = setInterval(=>
      if @events.length > 0
        @pairingChannel.trigger 'client-change', @events
        @events = []
    , 180)

  changeBuffer: (data) ->
    newRange = Range.fromObject(data.event.newRange)


    @pairingChannel.bind 'client-broadcast-initial-marker', (data) => @receiveFriendInfo(data)

    @pairingChannel.bind 'client-grammar-sync', (syntax) =>
      grammar = atom.grammars.grammarForScopeName(syntax)
      @editor.setGrammar(grammar)
