Fix LayoutRunIter returning lines beyond Buffer height
This commit is contained in:
parent
a03ec6b75f
commit
0e2d050a8d
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ impl<'b> Iterator for LayoutRunIter<'b> {
|
|||
let centering_offset = (line_height - glyph_height) / 2.0;
|
||||
let line_y = line_top + centering_offset + layout_line.max_ascent;
|
||||
if let Some(height) = self.buffer.height_opt {
|
||||
if line_top + centering_offset > height {
|
||||
if line_y > height {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue