       # Move a clone into position.
       (clone = @block.clone()).moveTo editor.tree.getTokenAtLocation @before
 
+      # If the block was the lasso select, register it
+      # as such.
+      if @block.type is 'segment' and @block.isLassoSegment
+        editor.lassoSegment = @block
+
       # Move the cursor to the end of it.
       return clone.end
 

    constructor: (segment) ->
      @first = segment.start.getSerializedLocation()
      @last = segment.end.getSerializedLocation()
      @lassoSelect = segment.isLassoSelect

    undo: (editor) ->
      editor.tree.getTokenAtLocation(@first).container.unwrap()

    constructor: (segment) ->
      @first = segment.start.getSerializedLocation()
      @last = segment.end.getSerializedLocation()
      @lassoSelect = segment.isLassoSegment

    undo: (editor) ->
      segment = new model.Segment()
      segment.isLassoSegment = @lassoSelect
      segment.wrap editor.tree.getTokenAtLocation(@first),
        editor.tree.getTokenAtLocation(@last)

      if @lassoSelect
        editor.lassoSegment = segment

      return segment.end

