diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-03-13 14:46:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-13 13:46:00 +0000 |
| commit | 7c61ccac71fbdc4fd6fe905f86703b48a53c8d06 (patch) | |
| tree | 3b9930681c7ce129297eed969ed4c95f2b817749 /crates | |
| parent | 28012b2f8dbbaf8ae168c7afd33f2f9e00a7d840 (diff) | |
Fix non-terminating loop in flow layout (#3652)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst/src/layout/flow.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/typst/src/layout/flow.rs b/crates/typst/src/layout/flow.rs index 85f67142..8f0def17 100644 --- a/crates/typst/src/layout/flow.rs +++ b/crates/typst/src/layout/flow.rs @@ -257,9 +257,15 @@ impl<'a> FlowLayouter<'a> { let carry: Vec<_> = self.items.drain(sticky..).collect(); self.finish_region(engine, false)?; + let in_last = self.regions.in_last(); + for item in carry { self.layout_item(engine, item)?; } + + if in_last { + break; + } } } |
