Files
deckcraft/crates/engine
Nikita RakitinandCursor 084e076c1d Undo: cap the history by memory as well as by steps
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>
2026-10-14 06:41:16 +03:00
..