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:
parent
169667ef1b
commit
4d849aaf0b
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue