From e22a6362ccab4088e1b9be2ca7d9c577aea99d3e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 12 Nov 2026 06:53:12 -0800 Subject: [PATCH] Compose: list every case that composes a story whole in gap 20 docs/gaps.md now lists the same cases as docs/architecture.md and reuse::plain. A doc comment on rejoin says that a run style an edit uses for the first time stops the reuse until the old composition reaches the same style at the same index. --- crates/compose/src/reuse.rs | 5 +++++ docs/gaps.md | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/compose/src/reuse.rs b/crates/compose/src/reuse.rs index 67a7d6314..d3f570ebe 100644 --- a/crates/compose/src/reuse.rs +++ b/crates/compose/src/reuse.rs @@ -309,6 +309,11 @@ impl Reuse<'_> { /// At paragraph `pi` of the edited story, in the state `snap` with `styles` and `info` as /// they are: when the composition before the edit was in that state before the same /// paragraph, copy what it set from there on into `out`, `styles` and `info`, and say so. + /// + /// The copied lines keep their run-style indexes, so this needs `styles` to equal the old + /// table up to that point. A run style that the edit uses for the first time takes a new + /// index, and the story then composes on until the old composition added the same style at + /// the same index, or to its end. The result is the same; only the time differs. pub(crate) fn rejoin( &self, plan: &Plan, diff --git a/docs/gaps.md b/docs/gaps.md index df396e9f6..02f02a33b 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -233,7 +233,10 @@ Kind: **F** feature · **U** UI/UX · **T** typography · **FF** file format · ### 20. Performance on large documents (P) - **Missing:** the 8 ms keystroke budget in long stories: an edit that moves lines into other frames composes the story to its end, the lines an edit keeps are copied, and stories with - footnotes, tables, anchored objects or keep options that move lines compose whole; benchmarks + footnotes, endnotes, tables, anchored objects, named lists, tracked deletions, balanced + columns, vertical justification other than Top, column rules, type on a path, spanning or + split paragraphs, paragraph borders or shading, or keep options that move lines compose + whole; benchmarks against InDesign on long books and image-heavy catalogues. - **Have:** compose 300k characters ~38 ms warm, damage-region repaint (< 1 ms while typing), parallel story composition, and an edit composes only the paragraphs it can change in a plain