EditGroup
Namespace: Hex1b.Documents
Assembly: Hex1b.dll
An atomic group of edit operations that are undone/redone together. Captures cursor state before and after for full undo fidelity.
public sealed class EditGroupInheritance
Object → EditGroup
Constructors
EditGroup(CursorSetSnapshot, long, string?)
Parameters:
cursorsBefore(CursorSetSnapshot):versionBefore(Int64):source(String):
public EditGroup(CursorSetSnapshot cursorsBefore, long versionBefore, string? source = null)Properties
CreatedTicks
Timestamp when the group was created (for coalescing timeout).
Returns: Int64
public long CreatedTicks { get; }CursorsAfter
Cursor positions after the group was applied (set on commit).
Returns: CursorSetSnapshot
public CursorSetSnapshot? CursorsAfter { get; }CursorsBefore
Cursor positions before the group was applied.
Returns: CursorSetSnapshot
public CursorSetSnapshot CursorsBefore { get; }InverseOperations
The inverse operations (in reverse application order for undo).
Returns: IReadOnlyList<EditOperation>
public IReadOnlyList<EditOperation> InverseOperations { get; }IsCoalescable
Whether this group can be coalesced with adjacent typing groups.
Returns: Boolean
public bool IsCoalescable { get; init; }IsEmpty
Whether this group has any operations.
Returns: Boolean
public bool IsEmpty { get; }Operations
The operations in this group (in application order).
Returns: IReadOnlyList<EditOperation>
public IReadOnlyList<EditOperation> Operations { get; }Source
Source tag for the edit (e.g., "typing", "paste", "undo").
Returns: String
public string? Source { get; }VersionAfter
Document version after the last operation in the group.
Returns: Int64
public long VersionAfter { get; }VersionBefore
Document version before the first operation in the group.
Returns: Int64
public long VersionBefore { get; }