GRAPHICS: MACGUI: fix regression of scrolling cursor in mactext

This commit is contained in:
ysj1173886760 2021-06-11 15:34:22 +08:00 committed by Eugene Sandulenko
parent 9ef28b2acb
commit d30e009eff

View file

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