Merge pull request #8284 from ChillerDragon/pr_newline_cursor

Always update text cursor y (closed #8282)
This commit is contained in:
Robert Müller 2024-04-30 16:10:14 +00:00 committed by GitHub
commit 3fc6ee4349
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();
}