class_docstr: Return struct for functions wrapped in ``text_object``.
  Both `start` and `end` are relative to the current cursor position.
class_docstr_tok: ["Return","struct","for","functions","wrapped","in","``","text_object","``",".","Both","`","start","`","and","`","end","`","are","relative","to","the","current","cursor","position","."]
docstr: Turn text object into `ClipboardData` instance.
docstr_tok: ["Turn","text","object","into","`","ClipboardData","`","instance","."]
code: def cut(self, buffer: Buffer) -> tuple[Document, ClipboardData]:
      """
      Turn text object into `ClipboardData` instance.
      """
      from_, to = self.operator_range(buffer.document)
  
      from_ += buffer.cursor_position
      to += buffer.cursor_position
  
      # For Vi mode, the SelectionState does include the upper position,
      # while `self.operator_range` does not. So, go one to the left, unless
      # we're in the line mode, then we don't want to risk going to the
      # previous line, and missing one line in the selection.
      if self.type != TextObjectType.LINEWISE:
          to -= 1
  
      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
  
imports: from __future__ import annotations
  import codecs
  import string
  from enum import Enum
  from itertools import accumulate
  from typing import Callable, Iterable, Tuple, TypeVar
  from prompt_toolkit.application.current import get_app
  from prompt_toolkit.buffer import Buffer, indent, reshape_text, unindent
  from prompt_toolkit.clipboard import ClipboardData
  from prompt_toolkit.document import Document
  from prompt_toolkit.filters import Always, Condition, Filter, has_arg, is_read_only, is_searching
  from prompt_toolkit.filters.app import in_paste_mode, is_multiline, vi_digraph_mode, vi_insert_mode, vi_insert_multiple_mode, vi_mode, vi_navigation_mode, vi_recording_macro, vi_replace_mode, vi_replace_single_mode, vi_search_direction_reversed, vi_selection_mode, vi_waiting_for_text_object_mode
  from prompt_toolkit.input.vt100_parser import Vt100Parser
  from prompt_toolkit.key_binding.digraphs import DIGRAPHS
  from prompt_toolkit.key_binding.key_processor import KeyPress, KeyPressEvent
  from prompt_toolkit.key_binding.vi_state import CharacterFind, InputMode
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.search import SearchDirection
  from prompt_toolkit.selection import PasteMode, SelectionState, SelectionType
  from ..key_bindings import ConditionalKeyBindings, KeyBindings, KeyBindingsBase
  from .named_commands import get_by_name
label_desc: Use image node_id 6 for calling the TextObject obj's underlying member method code with example usage: obj.cut(buffer) and returns: new_document,  clipboard_data