Commit 50c09bc
Reorder spanner columns to body order before rendering
lt matches a spanner to the visual position of its first column, then spans
the next columns.length cells. When a spanner's columns were listed in an
order other than the final left-to-right body order (e.g. after lt_move(),
or when selected by a predicate formula that returns data-frame order), the
mismatched first column shifted the colspan and could silently drop later
spanners.
Reorder each explicit spanner's columns to match `visible` (the post-move
body order) in resolveSpec() before the header row is built. This makes
spanners order-insensitive and lets predicate selectors like
`columns = ~ endsWith(., "_time")` be used for spanners safely. Columns must
still be contiguous in the body.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent d9f4f38 commit 50c09bc
3 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
357 | 365 | | |
358 | 366 | | |
359 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
205 | 224 | | |
206 | 225 | | |
207 | 226 | | |
| |||
0 commit comments