setCursor method

void setCursor(
  1. int x,
  2. int y
)

Moves the cursor to column x, row y (0-based; relative to the scroll region in origin mode) (CUP).

Implementation

void setCursor(int x, int y) {
  _seq('\x1b[${max(y, 0) + 1};${max(x, 0) + 1}H');
}