   class DestroySegmentOperation extends UndoOperation
     constructor: (segment) ->
       @first = segment.start.getSerializedLocation()
-      @last = segment.end.getSerializedLocation()
+      @last = segment.end.getSerializedLocation() - 2
       @lassoSelect = segment.isLassoSegment
 
     undo: (editor) ->

          @addMicroUndoOperation new DropOperation blocks, @cursor.previousVisibleToken()

          blocks.spliceIn @cursor
          unless @copyPasteInput.value[@copyPasteInput.value.length - 1] is '\n' or
              blocks.end.nextVisibleToken().type in ['newline', 'indentEnd']
            blocks.end.insert new model.NewlineToken()

          @addMicroUndoOperation new DestroySegmentOperation blocks

  class CreateSegmentOperation extends UndoOperation
    constructor: (segment) ->
      @first = segment.start.getSerializedLocation()
      @last = segment.end.getSerializedLocation() - 2
      @lassoSelect = segment.isLassoSegment

    undo: (editor) ->
