mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-24 10:37:03 -06:00
Undo kept up to 500 steps whatever their size. Steps share what an edit didn't touch, so most are small, but a deck-wide edit (slide size, theme, find-and-replace style changes) keeps a copy of every slide: 500 of those on a big deck could hold hundreds of copies. Each step's cost is now estimated when it is pushed (the slides, masters and media it doesn't share with the document after it), and the oldest steps are dropped while the total passes History::byte_limit (UNDO_BYTE_BUDGET, 256 MiB, by default). The newest step always stays. Co-authored-by: Cursor <cursoragent@cursor.com>