         if @draggingBlock is @lassoSegment
           @lassoSegment = null
 
-        @draggingBlock = null
-        @draggingOffset = null
-        @lastHighlight = null
-
-        @clearDrag()
-        @redrawMain()
+        @endDrag()
         return
 
       else if renderPoint.x - @scrollOffsets.main.x < 0


      if @inTree(@draggingBlock) and @mainViewOrChildrenContains @draggingBlock, renderPoint
        @draggingBlock.ephemeral = false

        @draggingBlock = null
        @draggingOffset = null
        @lastHighlight = null

        @clearDrag()
        @redrawMain()

  # LINE NUMBER GUTTER CODE
  # ================================


            @addMicroUndoOperation new ReparseOperation parent, newBlock

      # Move the cursor to the position we just
      # dropped the block
      @moveCursorTo @draggingBlock.end, true

      # Now that we've done that, we can annul stuff.
      @endDrag()

  # FLOATING BLOCK SUPPORT
  # ================================
