code: def cut(self, buffer):
          
          from_, to = self.operator_range(buffer.document)
  
          from_ += buffer.cursor_position
          to += buffer.cursor_position
          to -= 1  # SelectionState does not include the end position, `operator_range` does.
  
          document = Document(buffer.text, to, SelectionState(
              original_cursor_position=from_, type=self.selection_type))
  
          new_document, clipboard_data = document.cut_selection()
          return new_document, clipboard_data
docs: Turn text object into `ClipboardData` instance.