mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-01 14:26:49 -06:00
Merge main into #1409
# Conflicts: # crates/engine/src/session/undo.rs # docs/roadmap.md
This commit is contained in:
@@ -9,6 +9,8 @@ struct GroupDocCheckpoint {
|
||||
selection: Vec<NodeId>,
|
||||
page: NodeId,
|
||||
undo_len: usize,
|
||||
/// An undo inside pops undo steps; a failed group has to bring them back.
|
||||
undo: Vec<HistoryEntry>,
|
||||
redo: Vec<HistoryEntry>,
|
||||
limit: usize,
|
||||
}
|
||||
@@ -302,6 +304,7 @@ impl Session {
|
||||
selection: ds.selection.clone(),
|
||||
page: ds.page,
|
||||
undo_len: ds.history.undo.len(),
|
||||
undo: ds.history.undo.clone(),
|
||||
// An edit inside clears redo; a failed group has to bring it back.
|
||||
redo: ds.history.redo.clone(),
|
||||
limit: ds.history.limit,
|
||||
@@ -341,7 +344,7 @@ impl Session {
|
||||
ds.doc = saved.doc;
|
||||
ds.selection = saved.selection;
|
||||
ds.page = saved.page;
|
||||
ds.history.undo.truncate(saved.undo_len);
|
||||
ds.history.undo = saved.undo;
|
||||
ds.history.limit = saved.limit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user