moveToOffset method

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

Implementation

void moveToOffset(int x, int y) {
  /// 减一的原因在于左上角为1;1
  currentPointer = Position(
    max(x - 1, 0),
    max(
      y - 1 + currentBuffer!.position,
      0,
    ),
  );
}