Fix TextEdit selection bounds for multiple lines

If we select from the beginning of a line to the previous line the
selection painting process was including the first character of the
line where we started, but it shouldn't be included (as the cursor
started in pos=0).
This commit is contained in:
David Capello 2025-10-07 09:25:38 -03:00
parent 0faf9c0206
commit fb4f4d9fa6
1 changed files with 1 additions and 1 deletions

View File

@ -860,7 +860,7 @@ gfx::Rect TextEdit::Line::getBounds(const int glyph) const
gfx::Rect TextEdit::Line::getBounds(int startGlyph, int endGlyph) const
{
if (startGlyph == endGlyph)
return getBounds(startGlyph);
return {};
ASSERT(endGlyph > startGlyph);