mirror of https://github.com/stelzo/typst.git
Fix non-terminating loop in flow layout (#3652)
This commit is contained in:
parent
28012b2f8d
commit
7c61ccac71
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -0,0 +1,11 @@
|
|||
// Flow layout should terminate!
|
||||
// https://github.com/typst/typst/issues/3641
|
||||
//
|
||||
// This is not yet ideal: The heading should not move to the second page, but
|
||||
// that's a separate bug and not a regression.
|
||||
|
||||
---
|
||||
#set page(height: 40pt)
|
||||
|
||||
= Heading
|
||||
#lorem(6)
|
||||
Loading…
Reference in New Issue