Half-fix rendering bug
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 11 Apr 2025 03:52:58 +0000 (20:52 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 11 Apr 2025 03:52:58 +0000 (20:52 -0700)
rust/pspp/src/output/pivot/output.rs

index 24ae41ee96f9f4037c64d2a9e7e7d8f44646437b..05febd7cfc51587a5253edb1a793302c9f94818f 100644 (file)
@@ -414,7 +414,7 @@ impl<'a> Heading<'a> {
             // Merge adjacent identical categories (but don't merge across a vertical rule).
             let categories = categories
                 .coalesce(|(a_r, a), (b_r, b)| {
-                    if !vrules[b_r.start] && std::ptr::eq(a, b) {
+                    if a_r.end == b_r.start && !vrules[b_r.start] && std::ptr::eq(a, b) {
                         Ok((a_r.start..b_r.end, a))
                     } else {
                         Err(((a_r, a), (b_r, b)))