Clear redo stack when pushing remote transaction or ending a local one

This commit is contained in:
Antonio Scandurra 2022-05-22 10:27:34 +02:00
parent 5f69996604
commit 03dc7c8eb0
2 changed files with 12 additions and 0 deletions

View file

@ -216,6 +216,7 @@ impl History {
self.undo_stack.pop();
None
} else {
self.redo_stack.clear();
let entry = self.undo_stack.last_mut().unwrap();
entry.last_edit_at = now;
Some(entry)
@ -276,6 +277,7 @@ impl History {
last_edit_at: now,
suppress_grouping: false,
});
self.redo_stack.clear();
}
fn push_undo(&mut self, op_id: clock::Local) {