     return {"lines": @sLines, "lineEndings": @sLineEndings}
 
   CMD_process: (changes) ->
+    @externalchanges = []
+    console.log "External Changes:"
+    console.log changes
     if changes?
-      @externalChange(c) for c in changes
+      for pchanges in changes
+        @externalChange(c) for c in pchanges
     @process()

CollabGroupProtocol = require '../atox-collabGroupProtocol'

newlineRegex: /\r\n|\n|\r/g

module.exports =
class Collab extends CollabGroupProtocol

    @pmutex = true
    @icb = []

    @disposables.push @editor.getBuffer().onDidChange (e) => @internalChange e
    @disposables.push @editor.onDidChangeSelectionRange (e) =>
      @changedSelection e

