From 508b6d16150538bea28a1fe7e388f7a941a075a8 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Mon, 29 Apr 2024 14:04:24 +0800 Subject: [PATCH] Always update text cursor y (closed #8282) --- src/engine/client/text.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp index 7616c0164..c2872bd16 100644 --- a/src/engine/client/text.cpp +++ b/src/engine/client/text.cpp @@ -1612,7 +1612,6 @@ public: bool HasCursor = false; const SGlyph *pLastGlyph = nullptr; - bool GotNewLine = false; bool GotNewLineLast = false; int ColorOption = 0; @@ -1902,7 +1901,6 @@ public: { if(!StartNewLine()) break; - GotNewLine = true; GotNewLineLast = true; } else @@ -1998,11 +1996,9 @@ public: // even if no text is drawn the cursor position will be adjusted pCursor->m_X = DrawX; + pCursor->m_Y = DrawY; pCursor->m_LineCount = LineCount; - if(GotNewLine) - pCursor->m_Y = DrawY; - TextContainer.m_BoundingBox = pCursor->BoundingBox(); }