       @scrollLineIntoView(cursor.focus())
 
 
-  removed: (node, line) =>
+  removed: (mutations) =>
+    line = node = mutations.target
     while line? && line.parentElement != @element()
       line = line.parentElement
 




  outdated: (mutations) =>
    @observer.hold =>
      for mutation in mutations
        @appended(node, mutation.target) for node in mutation.addedNodes
        @removed(node, mutation.target) for node in mutation.removedNodes
        if mutation.type == 'characterData'
          @update mutation.target

    event = new CustomEvent('Editor:updated', {bubbles: true})
    @element().dispatchEvent(event)




  updated: (mutations) ->
    node = mutations.target
    while node? && node.parentElement != @element()
      node = node.parentElement

