From 32067e77bd69fca0e8ff8b73a7e65309f34da83f Mon Sep 17 00:00:00 2001 From: hugoj-goncalves Date: Wed, 6 Aug 2025 18:06:09 -0300 Subject: [PATCH] fix --- src/framework/ui/uitextedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/ui/uitextedit.cpp b/src/framework/ui/uitextedit.cpp index 4b0b007827..fdf7b5a238 100644 --- a/src/framework/ui/uitextedit.cpp +++ b/src/framework/ui/uitextedit.cpp @@ -592,7 +592,7 @@ void UITextEdit::moveCursorVertically(bool) int UITextEdit::getTextPos(const Point& pos) { - const int textLength = m_text.length(); + const int textLength = std::min(m_glyphsCoords.size(), m_text.length()); // find any glyph that is actually on the int candidatePos = -1;