Expand description
Inverse-op derivation for undo recording.
Given an EditOp, the substring it removed (empty for Insert),
and the post-edit rope, return the op that would undo it. Pure
logic; the recovery path uses it on replayed edits to reconstruct
undo records without having the pre-edit rope on hand.
Functionsยง
- compute_
inverse_ op - Compute the inverse of
opgiven the original removed text and the post-edit rope. Pure logic; reusable by recovery (which has only(rope_after, op, removed_text)) as well as by the core thread.