euporie.core.widgets.cell.Document
- class euporie.core.widgets.cell.Document(text: str = '', cursor_position: int | None = None, selection: prompt_toolkit.selection.SelectionState | None = None)
This is a immutable class around the text and cursor position, and contains methods for querying this data, e.g. to give the text before the cursor.
This class is usually instantiated by a
Buffer
object, and accessed as the document property of that class.- Parameters:
text – string
cursor_position – int
selection –
SelectionState