From fb4f4d9fa6cb59cb0f318141ca0240334f35a577 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 7 Oct 2025 09:25:38 -0300 Subject: [PATCH] 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). --- src/ui/textedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/textedit.cpp b/src/ui/textedit.cpp index 763da8dd0..2213bb6d4 100644 --- a/src/ui/textedit.cpp +++ b/src/ui/textedit.cpp @@ -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);