     d 'buffer changed'
     @parse()
 
-  onCursorMoved: =>
+  onCursorMoved: (event) =>
     return unless @eventCursorMoved
     if @eventCursorMoved == 'abort'
-      @abort()
+      @abort event
     else
       clearTimeout @cursorMovedTimeoutId
       @cursorMovedTimeoutId = setTimeout @onCursorMovedAfter, 100

    # Register the markers of the references' ranges.
    # Highlight these markers.
    @renamingMarkers = for range in ranges
      @editor.addSelectionForBufferRange range
      marker = @editor.markBufferRange range
      @editor.decorateMarker marker, type: 'highlight', class: 'refactor-reference'
      marker
    # Start renaming life cycle.
    @eventCursorMoved = off
    @eventCursorMoved = 'abort'

    # Returns true not to abort keyboard binding.
    true

  abort: (event) =>
    # When this editor isn't active, do nothing.
    return unless @isActive() and @renamingCursor? and @renamingMarkers?

    d 'move cursor from', event.oldBufferPosition, 'to', event.newBufferPosition
    for marker in @renamingMarkers
      return if marker.getBufferRange().containsPoint event.newBufferPosition
    @done()
    return

    # Verify all cursors are in renaming markers.
    # When the cursor is out of marker at least one, abort renaming.
