Make paste a separate undo transaction from preceding edits (#52003)

When undoing a paste, it is really confusing when that actually also
removes what was type right before the paste if the paste happened fast
enough after.

Release Notes:

- Fixed undoing a paste sometimes also undoing edits right before the
paste
This commit is contained in:
Lukas Wirth authored and GitHub committed 2026-03-30 07:17:02 +00:00
1 parent f746bbff0c
commit 6d33fa6b71
6 files changed
+55 -15

No files matched your search

@@ -3513,8 +3513,8 @@ fn test_history(cx: &mut App) {
buf
});
let multibuffer = cx.new(|_| MultiBuffer::new(Capability::ReadWrite));
multibuffer.update(cx, |this, _| {
this.set_group_interval(group_interval);
multibuffer.update(cx, |this, cx| {
this.set_group_interval(group_interval, cx);
});
multibuffer.update(cx, |multibuffer, cx| {
multibuffer.set_excerpts_for_path(