code: @Override
      public void setCursorPosition(TerminalPosition position) {
          if(position == null) {
              //Skip any validation checks if we just want to hide the cursor
              this.cursorPosition = null;
              return;
          }
          if(position.getColumn() < 0) {
              position = position.withColumn(0);
          }
          if(position.getRow() < 0) {
              position = position.withRow(0);
          }
          if(position.getColumn() >= terminalSize.getColumns()) {
              position = position.withColumn(terminalSize.getColumns() - 1);
          }
          if(position.getRow() >= terminalSize.getRows()) {
              position = position.withRow(terminalSize.getRows() - 1);
          }
          this.cursorPosition = position;
      }
docs: Moves the current cursor position or hides it. If the cursor is hidden and given a new position, it will be
  visible after this method call.
  
  @param position 0-indexed column and row numbers of the new position, or if {@code null}, hides the cursor