From fad03a474bedffcf4663f5e5475e69819a33bc35 Mon Sep 17 00:00:00 2001 From: +merlan #flirora Date: Tue, 24 Jun 2025 16:27:22 -0400 Subject: [PATCH] Use unstable sort for sorting frames --- crates/typst-layout/src/inline/line.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-layout/src/inline/line.rs b/crates/typst-layout/src/inline/line.rs index cf788b15b..61798d757 100644 --- a/crates/typst-layout/src/inline/line.rs +++ b/crates/typst-layout/src/inline/line.rs @@ -561,7 +561,7 @@ pub fn commit( add_par_line_marker(&mut output, marker, engine, locator, top); } - frames.sort_by_key(|(_, _, idx)| *idx); + frames.sort_unstable_by_key(|(_, _, idx)| *idx); // Construct the line's frame. for (offset, frame, _) in frames { let x = offset + p.config.align.position(remaining);