text_editor: Avoid rendering text outside the border

If the height could fit slightly less than an extra line, said line
would protrude beyond the border of the text editor.
This commit is contained in:
Maja Kądziołka 2024-08-03 20:32:51 +02:00
parent 169667ef1b
commit 4d849aaf0b
No known key found for this signature in database

View file

@ -729,7 +729,7 @@ where
defaults: &renderer::Style,
layout: Layout<'_>,
cursor: mouse::Cursor,
viewport: &Rectangle,
_viewport: &Rectangle,
) {
let bounds = layout.bounds();
@ -793,7 +793,7 @@ where
},
position,
style.placeholder,
*viewport,
bounds,
);
}
} else {
@ -801,7 +801,7 @@ where
&internal.editor,
position,
defaults.text_color,
*viewport,
bounds,
);
}