GRAPHICS: MACGUI: fix cursor drawing when we scroll the mactext

This commit is contained in:
ysj1173886760 2021-06-06 09:50:23 +08:00 committed by Eugene Sandulenko
parent 777a8c1d17
commit 5e734b0ca0

View File

@ -2038,7 +2038,7 @@ void MacText::updateCursorPos() {
else if (_textAlignment == kTextAlignCenter)
alignOffset = (_textMaxWidth / 2) - (getLineWidth(_cursorRow) / 2);
_cursorY = _textLines[_cursorRow].y + offset.y - 2;
_cursorY = _textLines[_cursorRow].y + offset.y - 2 - _scrollPos;
_cursorX = getLineWidth(_cursorRow, false, _cursorCol) + alignOffset + offset.x - 1;
}