     # Stop listening
     @editorView.off 'cursor:moved', @onCursorMoved
     @editor.off 'destroyed', @onDestroyed
-    # @editor.off 'contents-modified', @onContentsModified
-    @editor.buffer.off 'changed', @onContentsModified
+    @editor.buffer.off 'changed', @onBufferChanged
+    clearTimeout @bufferChangedTimeoutId
+    clearTimeout @cursorMovedTimeoutId
 
     # Destruct instances
     @ripper?.destruct()

  User events
  ###

  onContentsModified: =>
    @parse()

  onCursorMoved: =>
    # clearTimeout @timeoutId
    # @timeoutId = setTimeout @updateReferences, 0
    # nextTick => @updateReferences()
    @updateReferences()


  ###

    # Start listening
    @editorView.on 'cursor:moved', @onCursorMoved
    @editor.on 'destroyed', @onDestroyed
    @editor.buffer.on 'changed', @onBufferChanged

    # Execute
    @parse()
