Preserve read-only panning while canceling State edits

This commit is contained in:
2026-09-22 21:21:50 -07:00
parent 26979c1093
commit b8685416f5
3 changed files with 25 additions and 2 deletions
@@ -305,7 +305,16 @@ fn state_bend_self_loop_add_move_remove_clear_preserves_project_and_source_histo
vec![],
);
assert_eq!(app.project(), &baseline.decoded.project);
assert_source_model_agree(&app);
// Clear is a new source-preserving edit and may retain empty-list trivia.
// Exact original bytes are restored by history, not by reauthoring a value.
for _ in 0..3 {
assert!(app.document.can_undo());
send(&mut app, Message::Undo);
}
assert_eq!(app.project(), &baseline.decoded.project);
assert_eq!(app.document.bundle(), &baseline.bundle);
assert!(!app.document.can_undo());
}
#[test]