setCursor method
Implementation
void setCursor(int cursorX, int cursorY) {
var maxCursorY = viewHeight - 1;
if (terminal.originMode) {
cursorY += _marginTop;
maxCursorY = _marginBottom;
}
_cursorX = cursorX.clamp(0, viewWidth - 1);
_cursorY = cursorY.clamp(0, maxCursorY);
_invalidateCurrentLine();
}