mirror of
https://github.com/webodf/WebODF.git
synced 2026-12-01 16:56:05 +01:00
These undo rules attempts to implement undo/redo behaviour similar to how LibreOffice behaves. An undo state starts on an edit Operation. An undo state can be: - One or more text inserts in the same direction - One or more text removes in the same direction - Any other individual edit operation (e.g., split paragraph, style text, modify paragraph style) -An undo state includes any trailing non-edit operations such as cursor move. There are challenges going backwards and forwards on separate op stacks and generating identical states each time. As such, this has been implemented by storing the operation into the state it's relevant to upon execution (rather than traversal), and never splitting or modifying these during movements forwards and backwards.