diff --git a/crates/engine/src/cmd/addons/cleanup/text/tests.rs b/crates/engine/src/cmd/addons/cleanup/text/tests.rs index cf5f95a667..6b03a26384 100644 --- a/crates/engine/src/cmd/addons/cleanup/text/tests.rs +++ b/crates/engine/src/cmd/addons/cleanup/text/tests.rs @@ -435,6 +435,23 @@ fn remove_breaks_named_story_with_a_locked_frame() { assert_eq!(obj(&s, a).plain_text(), "one two"); } +/// Type on a locked artboard stays as it is even when `ids` names it, with no undo step. +#[test] +fn remove_breaks_named_type_on_a_locked_artboard() { + let mut s = session(); + let on_board = text(&mut s, json!({"x": 40, "y": 60, "text": "a\nb", "size": 12})); + s.edit("Lock Artboard", |d, _| { + d.artboards[0].locked = true; + Ok(()) + }) + .unwrap(); + let steps = undo_steps(&s); + let r = s.execute("addon.cleanup.removeBreaks", &json!({"kind": "paragraph", "ids": [on_board.0]})); + assert_eq!(other(r), "No paragraph breaks to remove"); + assert_eq!(undo_steps(&s), steps); + assert_eq!(obj(&s, on_board).plain_text(), "a\nb"); +} + /// Break Text, Combine and Join Point Text, Set Alignment, Keep Position and Reset Text Transform /// act on the locked and hidden type that `ids` names (type in a locked layer included), each as /// one undo step, and leave it as it is when it is only selected. diff --git a/docs/mcp.md b/docs/mcp.md index a9b621b298..3a9a88e7c8 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -10644,8 +10644,8 @@ topmost piece. The add-on's text tools act on the selected type (or `ids`), each as one undo step, and refuse with an error when there is nothing for them to do. From the selection they take only type that can be edited; the type that `ids` names, or that is inside a group or layer it names, is taken even when it, its group or its layer is locked or hidden (not type -on a locked artboard). The objects they make from locked or hidden type are not selected. The pieces they make are point type that keeps its characters' styles, each placed so the -glyph of its first character lands where it was drawn. +on a locked artboard). The objects they make from locked or hidden type are not selected. The pieces they make are +point type that keeps its characters' styles, each placed so the glyph of its first character lands where it was drawn. - `addon.cleanup.breakText {by?, ids?}` turns each horizontal point or area type object into point type objects, one per line (`by: "lines"`, the default), paragraph (`"paragraphs"`), word (`"words"`) or glyph (`"glyphs"`; a ligature diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index a5953d677e..481cd3e9d4 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -2050,7 +2050,8 @@ refusals), `addons::cleanup::tests` in `vectorcraft-ui-egui` (the submenu and th With `ids`, the text tools act on the type the ids name even when it, or its group or layer, is locked or hidden, as `text.convertListToText` does; from the selection they still take only type that can be edited (VectorCraft's own -rule). Tests: `named_locked_and_hidden_type` and the other `named_` tests in `cmd::addons::cleanup::text::tests`. +rule). Tests: `named_locked_and_hidden_type`, `remove_breaks_named_locked_and_hidden_type` and +`remove_breaks_named_story_with_a_locked_frame` in `cmd::addons::cleanup::text::tests`. ## Path Precision Tools add-on (2026-10-30)