winterm/cursor_helpers.go
func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error {
	position.X = ensureInRange(position.X, window.Left, window.Right)
	position.Y = ensureInRange(position.Y, window.Top, window.Bottom)
	err := SetConsoleCursorPosition(h.fd, position)
	if err != nil {
		return err
	}
	h.logf("Cursor position set: (%d, %d)", position.X, position.Y)
	return err
}
func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error {
	position.X = ensureInRange(position.X, window.Left, window.Right)
	position.Y = ensureInRange(position.Y, window.Top, window.Bottom)
	err := SetConsoleCursorPosition(h.fd, position)
	if err != nil {
		return err
	}
	h.logf("Cursor position set: (%d, %d)", position.X, position.Y)
	return err
}
func ( h * windowsAnsiEventHandler ) setCursorPosition ( position COORD , window SMALL_RECT ) error { position . X = ensureInRange ( position . X , window . Left , window . Right ) position . Y = ensureInRange ( position . Y , window . Top , window . Bottom ) err := SetConsoleCursorPosition ( h . fd , position ) if err != nil { return err } h . logf ( " " , position . X , position . Y ) return err }
// setCursorPosition sets the cursor to the specified position, bounded to the screen size
setCursorPosition sets the cursor to the specified position bounded to the screen size